@Only-api
@Post
@Get
@Delete
@Procedure
Feature: Surgery resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Procedure node. This resource is part of the Major Surgery.
File name: xam.feature
Relative path: api/xam.feature
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:38.194 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Biopsia abierta 7ª costilla",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:38.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"824"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:38.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J4vwRcwmVUS7tmKI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15618/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15618/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:38.831 [print] {
"resourceType": "Procedure",
"id": "15618",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:43.541+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:58:38.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:38.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"824"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:38.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J4vwRcwmVUS7tmKI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15618/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15618/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:38.831 [print] {
"resourceType": "Procedure",
"id": "15618",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:43.541+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:58:38.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:39.448 [print] {
"resourceType": "Procedure",
"id": "15618",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:43.541+02:00",
"source": "#J4vwRcwmVUS7tmKI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:40.197 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:40.820 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:58:44.930+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:58:44.930+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:40.836 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "hígado,"
}
}
],
"text": "Nefrectomía derecha + exéresis del tumor + linfadenectomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:41.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"843"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:41.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u4fNXhh37pCPm626"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15619/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15619/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:41.422 [print] {
"resourceType": "Procedure",
"id": "15619",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:46.152+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "hígado,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12"
}
> *
print COOKIES
10:58:41.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:41.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"843"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:41.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u4fNXhh37pCPm626"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15619/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15619/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:41.422 [print] {
"resourceType": "Procedure",
"id": "15619",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:46.152+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "hígado,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12"
}
> *
print COOKIES
10:58:41.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:42.355 [print] {
"resourceType": "Procedure",
"id": "15619",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:46.152+02:00",
"source": "#u4fNXhh37pCPm626",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "hígado,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:43.505 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:44.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:58:48.238+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:58:48.238+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:44.107 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "Pulmones,"
}
}
],
"text": "Metastasectomía toracoscópica segmentos posteriores LID",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:44.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1073"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:44.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gsZOsiY00DmFroXh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15620/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15620/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:44.734 [print] {
"resourceType": "Procedure",
"id": "15620",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:49.483+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "Pulmones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
10:58:44.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:44.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1073"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:44.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gsZOsiY00DmFroXh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15620/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15620/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:44.734 [print] {
"resourceType": "Procedure",
"id": "15620",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:49.483+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "Pulmones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
10:58:44.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:45.351 [print] {
"resourceType": "Procedure",
"id": "15620",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:49.483+02:00",
"source": "#gsZOsiY00DmFroXh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "Pulmones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:45.969 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:46.602 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:58:50.717+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:58:50.717+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:46.602 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Nefrectomía radical izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:48.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"697"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:48.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zEajBUQBns2C7LUE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15621/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15621/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:48.243 [print] {
"resourceType": "Procedure",
"id": "15621",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:52.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
10:58:48.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:48.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"697"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:48.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zEajBUQBns2C7LUE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15621/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15621/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:48.243 [print] {
"resourceType": "Procedure",
"id": "15621",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:52.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
10:58:48.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:48.822 [print] {
"resourceType": "Procedure",
"id": "15621",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:52.980+02:00",
"source": "#zEajBUQBns2C7LUE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:49.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:50.314 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:58:54.189+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:58:54.189+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:50.314 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Incisión transversa supraumbilical, exéresis resto tumoral, adenopatía y apéndice",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:51.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"889"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:51.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"119PJceuXqJkE12U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15622/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15622/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:51.036 [print] {
"resourceType": "Procedure",
"id": "15622",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:55.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:58:51.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:51.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"889"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:51.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"119PJceuXqJkE12U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15622/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15622/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:51.036 [print] {
"resourceType": "Procedure",
"id": "15622",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:55.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:58:51.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:51.659 [print] {
"resourceType": "Procedure",
"id": "15622",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:55.714+02:00",
"source": "#119PJceuXqJkE12U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:52.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:52.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:58:57.031+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:58:57.031+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:52.878 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "orquiectomía izquierd y biopsia del testículo contralateral",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:53.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"624"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:53.495 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dxCsvf0Y1k1pE8zW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15623/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15623/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:53.495 [print] {
"resourceType": "Procedure",
"id": "15623",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:58.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
10:58:53.495 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:53.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"624"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:53.495 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dxCsvf0Y1k1pE8zW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15623/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:58:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15623/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:58:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:53.495 [print] {
"resourceType": "Procedure",
"id": "15623",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:58.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
10:58:53.495 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:54.085 [print] {
"resourceType": "Procedure",
"id": "15623",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:58:58.206+02:00",
"source": "#dxCsvf0Y1k1pE8zW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:54.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:55.455 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:58:59.460+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:58:59.460+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:55.455 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "ojo"
}
}
],
"text": "Prótesis cadera izquierda ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:56.479 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"831"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:56.479 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mIVH1Tk6YiNQgeiu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15624/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15624/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:56.479 [print] {
"resourceType": "Procedure",
"id": "15624",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:01.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "ojo"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
10:58:56.479 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:56.479 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"831"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:56.479 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mIVH1Tk6YiNQgeiu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15624/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15624/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:56.479 [print] {
"resourceType": "Procedure",
"id": "15624",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:01.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "ojo"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
10:58:56.479 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:57.095 [print] {
"resourceType": "Procedure",
"id": "15624",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:01.210+02:00",
"source": "#mIVH1Tk6YiNQgeiu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "ojo"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:57.728 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:58.329 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:02.475+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:02.475+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:58:58.329 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Toractomía derecha con exéresis de las metástasis en LID segmentectomía atípica derecha ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:58.937 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"890"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:58.937 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IeNMJWGPIc3GpamG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15625/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15625/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:58.937 [print] {
"resourceType": "Procedure",
"id": "15625",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:03.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
10:58:58.937 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:58.937 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"890"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:58.937 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IeNMJWGPIc3GpamG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15625/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15625/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:58.937 [print] {
"resourceType": "Procedure",
"id": "15625",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:03.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
10:58:58.937 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:59.843 [print] {
"resourceType": "Procedure",
"id": "15625",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:03.668+02:00",
"source": "#IeNMJWGPIc3GpamG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:00.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:01.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:05.258+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:05.258+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:01.162 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"text": "Laminectomía T11",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:01.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:01.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N2pRdKkTDHqNsAby"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15626/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15626/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:01.780 [print] {
"resourceType": "Procedure",
"id": "15626",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:06.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
10:59:01.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:01.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:01.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N2pRdKkTDHqNsAby"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15626/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15626/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:01.780 [print] {
"resourceType": "Procedure",
"id": "15626",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:06.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
10:59:01.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:02.382 [print] {
"resourceType": "Procedure",
"id": "15626",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:06.519+02:00",
"source": "#N2pRdKkTDHqNsAby",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:03.215 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:03.785 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:07.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:07.964+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:03.785 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Laparotomía y exéresis de los restos tumorales",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:04.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"942"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:04.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a3Tpng9HaG3XPA6T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15627/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15627/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:04.433 [print] {
"resourceType": "Procedure",
"id": "15627",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:09.180+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
10:59:04.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:04.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"942"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:04.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a3Tpng9HaG3XPA6T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15627/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15627/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:04.433 [print] {
"resourceType": "Procedure",
"id": "15627",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:09.180+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
10:59:04.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:05.092 [print] {
"resourceType": "Procedure",
"id": "15627",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:09.180+02:00",
"source": "#a3Tpng9HaG3XPA6T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:05.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:06.300 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:10.423+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:10.423+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:06.300 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Toma de biopsia muscular preauricular",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:07.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"949"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:07.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FMVVAGtXKXRaoSYE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15628/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15628/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:07.148 [print] {
"resourceType": "Procedure",
"id": "15628",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:11.875+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
10:59:07.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:07.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"949"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:07.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FMVVAGtXKXRaoSYE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15628/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15628/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:07.148 [print] {
"resourceType": "Procedure",
"id": "15628",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:11.875+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
10:59:07.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:07.719 [print] {
"resourceType": "Procedure",
"id": "15628",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:11.875+02:00",
"source": "#FMVVAGtXKXRaoSYE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:08.361 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:08.941 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:13.110+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:13.110+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:08.941 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Craniectomía suboccipital y exérsis de tumor de IV ventrículo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:09.527 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"976"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:09.527 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a2I8DuIRNgzU9c95"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15629/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15629/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:09.527 [print] {
"resourceType": "Procedure",
"id": "15629",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:14.270+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
10:59:09.527 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:09.542 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"976"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:09.542 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a2I8DuIRNgzU9c95"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15629/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15629/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:09.542 [print] {
"resourceType": "Procedure",
"id": "15629",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:14.270+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
10:59:09.542 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:10.181 [print] {
"resourceType": "Procedure",
"id": "15629",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:14.270+02:00",
"source": "#a2I8DuIRNgzU9c95",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:10.829 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:11.469 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:15.576+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:15.576+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:11.469 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Reconstrucción mándibula con costilla y pelvis",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:12.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"851"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:12.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qVfAUlnfEM1rD6bR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15630/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15630/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:12.070 [print] {
"resourceType": "Procedure",
"id": "15630",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:16.815+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
10:59:12.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:12.086 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"851"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:12.086 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qVfAUlnfEM1rD6bR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15630/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15630/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:12.086 [print] {
"resourceType": "Procedure",
"id": "15630",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:16.815+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
10:59:12.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:12.687 [print] {
"resourceType": "Procedure",
"id": "15630",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:16.815+02:00",
"source": "#qVfAUlnfEM1rD6bR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:13.288 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:14.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:18.027+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:18.027+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:14.106 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Septostomía + biopsia + sensor PIC",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:14.696 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"828"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:14.696 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kbGu3yy7nz8lfjWO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15631/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15631/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:14.696 [print] {
"resourceType": "Procedure",
"id": "15631",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:19.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
10:59:14.696 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:14.696 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"828"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:14.696 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kbGu3yy7nz8lfjWO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15631/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15631/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:14.696 [print] {
"resourceType": "Procedure",
"id": "15631",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:19.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
10:59:14.696 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:15.329 [print] {
"resourceType": "Procedure",
"id": "15631",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:19.441+02:00",
"source": "#kbGu3yy7nz8lfjWO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:16.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:17.576 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:21.716+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:21.716+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:17.576 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Estómago,"
}
}
],
"text": "Lipoaspiración y lipofilling técnica Coleman",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:18.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1088"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:18.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZhWNXwlKeFvUQws"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15632/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15632/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:18.194 [print] {
"resourceType": "Procedure",
"id": "15632",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:22.939+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Estómago,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
10:59:18.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:18.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1088"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:18.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZhWNXwlKeFvUQws"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15632/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15632/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:18.194 [print] {
"resourceType": "Procedure",
"id": "15632",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:22.939+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Estómago,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
10:59:18.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:19.015 [print] {
"resourceType": "Procedure",
"id": "15632",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:22.939+02:00",
"source": "#aZhWNXwlKeFvUQws",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Estómago,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:19.605 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:20.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:24.349+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:24.349+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:20.208 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Enucleación ojo derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:20.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"576"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:20.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v6iP1nOd1MzWg25X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15633/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15633/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:20.840 [print] {
"resourceType": "Procedure",
"id": "15633",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:25.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
10:59:20.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:20.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"576"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:20.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v6iP1nOd1MzWg25X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15633/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15633/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:20.840 [print] {
"resourceType": "Procedure",
"id": "15633",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:25.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
10:59:20.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:21.472 [print] {
"resourceType": "Procedure",
"id": "15633",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:25.558+02:00",
"source": "#v6iP1nOd1MzWg25X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:22.063 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:22.685 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:26.811+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:26.811+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:22.685 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Metastasectomía LSD por videotoracoscopia",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:23.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"937"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:23.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DTRWNI4axRfuyjpB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15634/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15634/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:23.308 [print] {
"resourceType": "Procedure",
"id": "15634",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:28.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:59:23.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:23.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"937"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:23.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DTRWNI4axRfuyjpB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15634/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15634/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:23.308 [print] {
"resourceType": "Procedure",
"id": "15634",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:28.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:59:23.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:23.941 [print] {
"resourceType": "Procedure",
"id": "15634",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:28.040+02:00",
"source": "#DTRWNI4axRfuyjpB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:24.843 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:25.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:29.583+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:29.583+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:25.461 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "toracotomía y extirpación de adenopatía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:26.256 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"936"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:26.256 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m6Sqe9pyjlMc0lYG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15635/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15635/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:26.256 [print] {
"resourceType": "Procedure",
"id": "15635",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:30.785+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
10:59:26.256 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:26.256 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"936"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:26.256 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m6Sqe9pyjlMc0lYG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15635/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15635/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:26.256 [print] {
"resourceType": "Procedure",
"id": "15635",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:30.785+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
10:59:26.256 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:26.905 [print] {
"resourceType": "Procedure",
"id": "15635",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:30.785+02:00",
"source": "#m6Sqe9pyjlMc0lYG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:27.791 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:28.377 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:32.542+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:32.542+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:28.377 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Extirpación hemimandíbula izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:28.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:28.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y3Ie5qvmDCZbp7px"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15636/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15636/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:28.963 [print] {
"resourceType": "Procedure",
"id": "15636",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:33.708+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
10:59:28.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:28.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:28.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y3Ie5qvmDCZbp7px"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15636/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15636/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:28.963 [print] {
"resourceType": "Procedure",
"id": "15636",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:33.708+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
10:59:28.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:29.596 [print] {
"resourceType": "Procedure",
"id": "15636",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:33.708+02:00",
"source": "#y3Ie5qvmDCZbp7px",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:30.198 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:31.876 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:34.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:34.940+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:31.876 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "toma de biopsia y laminectomía descompresiva ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:32.445 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"969"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:32.445 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zC3JDPAHIyE0toRK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15637/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15637/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:32.445 [print] {
"resourceType": "Procedure",
"id": "15637",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:37.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
10:59:32.445 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:32.445 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"969"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:32.445 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zC3JDPAHIyE0toRK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15637/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15637/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:32.445 [print] {
"resourceType": "Procedure",
"id": "15637",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:37.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
10:59:32.445 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:33.048 [print] {
"resourceType": "Procedure",
"id": "15637",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:37.194+02:00",
"source": "#zC3JDPAHIyE0toRK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:33.750 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:34.330 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:38.491+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:38.491+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:34.330 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Laparotomía con exéresis de la tumoración adrenal derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:35.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"616"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:35.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W9u4bnEcHAPUXwbP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15638/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15638/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:35.036 [print] {
"resourceType": "Procedure",
"id": "15638",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:39.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:59:35.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:35.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"616"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:35.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W9u4bnEcHAPUXwbP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15638/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15638/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:35.036 [print] {
"resourceType": "Procedure",
"id": "15638",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:39.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:59:35.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:35.595 [print] {
"resourceType": "Procedure",
"id": "15638",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:39.757+02:00",
"source": "#W9u4bnEcHAPUXwbP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:36.228 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:37.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:40.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:40.972+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:37.114 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Biopsia mediante mediastinoscopia",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:37.816 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"845"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:37.816 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cmas0K1AMc7n1Qpk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15639/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15639/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:37.816 [print] {
"resourceType": "Procedure",
"id": "15639",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:42.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
10:59:37.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:37.816 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"845"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:37.816 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cmas0K1AMc7n1Qpk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15639/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15639/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:37.816 [print] {
"resourceType": "Procedure",
"id": "15639",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:42.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
10:59:37.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:38.418 [print] {
"resourceType": "Procedure",
"id": "15639",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:42.565+02:00",
"source": "#cmas0K1AMc7n1Qpk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:39.035 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:39.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:43.764+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:43.764+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:39.682 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"text": "Intervención del resto tumoral",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:40.315 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"835"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:40.315 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fgVH90NLY59OAHqv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15640/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15640/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:40.315 [print] {
"resourceType": "Procedure",
"id": "15640",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:45.055+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:59:40.315 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:40.315 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"835"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:40.315 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fgVH90NLY59OAHqv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15640/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15640/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:40.315 [print] {
"resourceType": "Procedure",
"id": "15640",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:45.055+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:59:40.315 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:41.233 [print] {
"resourceType": "Procedure",
"id": "15640",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:45.055+02:00",
"source": "#fgVH90NLY59OAHqv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:41.867 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:42.569 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:46.612+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:46.612+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:42.569 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Epifisiodesis proximal tibia derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:43.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"933"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:43.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SJJnlrAXGP9Dyi1v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15641/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15641/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:43.193 [print] {
"resourceType": "Procedure",
"id": "15641",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:47.918+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
10:59:43.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:43.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"933"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:43.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SJJnlrAXGP9Dyi1v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15641/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15641/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:43.193 [print] {
"resourceType": "Procedure",
"id": "15641",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:47.918+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
10:59:43.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:43.815 [print] {
"resourceType": "Procedure",
"id": "15641",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:47.918+02:00",
"source": "#SJJnlrAXGP9Dyi1v",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:44.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:45.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:49.173+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:49.173+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:45.003 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Linfadenectomía inguinal superficial derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:45.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"865"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:45.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9caEB7CG2nTQV5XB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15642/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15642/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:45.636 [print] {
"resourceType": "Procedure",
"id": "15642",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:50.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:59:45.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:45.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"865"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:45.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9caEB7CG2nTQV5XB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15642/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15642/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:45.636 [print] {
"resourceType": "Procedure",
"id": "15642",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:50.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:59:45.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:46.238 [print] {
"resourceType": "Procedure",
"id": "15642",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:50.377+02:00",
"source": "#9caEB7CG2nTQV5XB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:46.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:47.411 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:51.589+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:51.589+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:47.411 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Resección 30 cm íleon",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:48.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"918"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:48.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JaKykx1wLJ6a1JJ2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15643/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15643/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:48.091 [print] {
"resourceType": "Procedure",
"id": "15643",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:52.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
10:59:48.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:48.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"918"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:48.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JaKykx1wLJ6a1JJ2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15643/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15643/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:48.091 [print] {
"resourceType": "Procedure",
"id": "15643",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:52.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
10:59:48.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:48.715 [print] {
"resourceType": "Procedure",
"id": "15643",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:52.835+02:00",
"source": "#JaKykx1wLJ6a1JJ2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-23",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:49.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:49.969 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:54.087+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:54.087+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:49.969 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Retirada catéter nefrostomía, colocación catéter doble J. Ooferectomía izquierda, pexia ovárica derecha. Exéresis tumoral completa.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:50.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"926"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:50.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2W9l4k0D450xOlF8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15644/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15644/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:50.987 [print] {
"resourceType": "Procedure",
"id": "15644",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:55.733+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
10:59:50.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:50.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"926"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:50.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2W9l4k0D450xOlF8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15644/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15644/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:50.987 [print] {
"resourceType": "Procedure",
"id": "15644",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:55.733+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
10:59:50.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:51.642 [print] {
"resourceType": "Procedure",
"id": "15644",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:55.733+02:00",
"source": "#2W9l4k0D450xOlF8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:52.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:52.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:56.999+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:56.999+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:52.827 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Extirpación de la lesión ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:53.453 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"926"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:53.453 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5sZKJVSj3aKgttjo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15645/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15645/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:53.453 [print] {
"resourceType": "Procedure",
"id": "15645",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:58.191+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:59:53.453 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:53.453 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"926"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:53.453 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5sZKJVSj3aKgttjo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15645/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:59:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15645/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:59:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:53.453 [print] {
"resourceType": "Procedure",
"id": "15645",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:58.191+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
10:59:53.453 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:54.319 [print] {
"resourceType": "Procedure",
"id": "15645",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:59:58.191+02:00",
"source": "#5sZKJVSj3aKgttjo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:55.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:55.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:59:59.919+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:59:59.919+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:55.823 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Exérsis de la tumoración más resección de los 2/3 distales de fémur",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:56.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:56.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"quPK99WB4DGs57Z2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15646/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15646/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:56.462 [print] {
"resourceType": "Procedure",
"id": "15646",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:01.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:59:56.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:56.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"637"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:56.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"quPK99WB4DGs57Z2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15646/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15646/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:56.462 [print] {
"resourceType": "Procedure",
"id": "15646",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:01.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
10:59:56.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:57.164 [print] {
"resourceType": "Procedure",
"id": "15646",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:01.170+02:00",
"source": "#quPK99WB4DGs57Z2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:57.805 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:58.391 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:02.550+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:02.550+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
10:59:58.391 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Extirpación tumoración fosa posterior",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:58.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"931"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:58.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2m6OwiENkIzKMn2S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15647/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15647/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:58.992 [print] {
"resourceType": "Procedure",
"id": "15647",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:03.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
10:59:58.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:58.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"931"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:58.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2m6OwiENkIzKMn2S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15647/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15647/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:58.992 [print] {
"resourceType": "Procedure",
"id": "15647",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:03.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
10:59:58.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:59.593 [print] {
"resourceType": "Procedure",
"id": "15647",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:03.729+02:00",
"source": "#2m6OwiENkIzKMn2S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:00.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:00.866 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:04.939+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:04.939+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:00.882 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Osteotomía desrrotadora interna de tibia y peroné bilateral y prótesis Kaliz + tenotomía Aquiles",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:02.478 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1008"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:02.478 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3HHr2XTGnKrGjCoM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15648/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15648/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:02.478 [print] {
"resourceType": "Procedure",
"id": "15648",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:07.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:02.478 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:02.478 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1008"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:02.478 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3HHr2XTGnKrGjCoM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15648/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15648/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:02.478 [print] {
"resourceType": "Procedure",
"id": "15648",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:07.221+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:02.478 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:03.096 [print] {
"resourceType": "Procedure",
"id": "15648",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:07.221+02:00",
"source": "#3HHr2XTGnKrGjCoM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:03.698 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:04.301 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:08.438+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:08.438+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:04.316 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"text": "Tumorectomía polar riñón izquierdo ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:04.949 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"820"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:04.949 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rcRIRhXQbA9bQkw7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15649/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15649/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:04.949 [print] {
"resourceType": "Procedure",
"id": "15649",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:09.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09"
}
> *
print COOKIES
11:00:04.949 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:04.965 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"820"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:04.965 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rcRIRhXQbA9bQkw7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15649/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15649/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:04.965 [print] {
"resourceType": "Procedure",
"id": "15649",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:09.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09"
}
> *
print COOKIES
11:00:04.965 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:05.608 [print] {
"resourceType": "Procedure",
"id": "15649",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:09.699+02:00",
"source": "#rcRIRhXQbA9bQkw7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:06.210 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:06.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:10.941+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:10.941+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:06.915 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Resecció completa tumoración fosa posterior",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:07.533 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"837"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:07.533 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4DxUNaiA3djFHZVA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15650/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15650/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:07.533 [print] {
"resourceType": "Procedure",
"id": "15650",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:12.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:07.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:07.533 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"837"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:07.533 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4DxUNaiA3djFHZVA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15650/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15650/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:07.533 [print] {
"resourceType": "Procedure",
"id": "15650",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:12.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:07.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:08.235 [print] {
"resourceType": "Procedure",
"id": "15650",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:12.276+02:00",
"source": "#4DxUNaiA3djFHZVA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:08.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:09.469 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:13.591+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:13.591+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:09.469 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Cabeza"
}
}
],
"text": "Laparotomía con exéresis de la tumoración adrenal derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:10.086 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:10.086 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sAV2A3ujWOxlZCMi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15651/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15651/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:10.086 [print] {
"resourceType": "Procedure",
"id": "15651",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:14.817+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Cabeza"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:00:10.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:10.086 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:10.086 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sAV2A3ujWOxlZCMi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15651/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15651/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:10.086 [print] {
"resourceType": "Procedure",
"id": "15651",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:14.817+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Cabeza"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:00:10.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:10.741 [print] {
"resourceType": "Procedure",
"id": "15651",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:14.817+02:00",
"source": "#sAV2A3ujWOxlZCMi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "Cabeza"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:12.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:12.995 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:17.091+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:17.091+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:12.995 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "resección del tumor más reconstrucción con aloinjerto y peroné vascularizado. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:13.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"995"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:13.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hD7IWTxcSrcaMkxT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15652/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15652/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:13.634 [print] {
"resourceType": "Procedure",
"id": "15652",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:18.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:13.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:13.634 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"995"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:13.634 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hD7IWTxcSrcaMkxT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15652/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15652/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:13.634 [print] {
"resourceType": "Procedure",
"id": "15652",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:18.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:13.634 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:14.467 [print] {
"resourceType": "Procedure",
"id": "15652",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:18.387+02:00",
"source": "#hD7IWTxcSrcaMkxT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:15.069 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:15.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:19.815+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:19.815+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:15.702 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Epifisiodesis fémur distal derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:16.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"700"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:16.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d0zGaTo0L7oqBOG1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15653/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15653/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:16.277 [print] {
"resourceType": "Procedure",
"id": "15653",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:21.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:00:16.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:16.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"700"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:16.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d0zGaTo0L7oqBOG1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15653/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15653/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:16.277 [print] {
"resourceType": "Procedure",
"id": "15653",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:21.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:00:16.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:16.894 [print] {
"resourceType": "Procedure",
"id": "15653",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:21.026+02:00",
"source": "#d0zGaTo0L7oqBOG1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:17.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:18.069 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:22.224+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:22.224+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:18.069 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Extracción plaza rota por fatiga y colocación de nueva placa en cara externa y una nueva en cara interna",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:18.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"909"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:18.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q64r0vMUKUHRxu4a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15654/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15654/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:18.655 [print] {
"resourceType": "Procedure",
"id": "15654",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:23.404+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:00:18.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:18.671 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"909"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:18.671 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q64r0vMUKUHRxu4a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15654/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15654/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:18.671 [print] {
"resourceType": "Procedure",
"id": "15654",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:23.404+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:00:18.671 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:19.319 [print] {
"resourceType": "Procedure",
"id": "15654",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:23.404+02:00",
"source": "#Q64r0vMUKUHRxu4a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:19.942 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:20.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:24.681+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:24.681+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:20.522 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "exéresis de recidiva de rabdomiosarcoma mediante orbitotomía. Se extrae una pieza tumoral encapsulada y restos tumorales accediendo a ella por el reborde orbitario superonasal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:21.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"966"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:21.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FqDdgYdrZRth7pA7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15655/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15655/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:21.107 [print] {
"resourceType": "Procedure",
"id": "15655",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:25.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:21.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:21.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"966"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:21.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FqDdgYdrZRth7pA7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15655/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15655/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:21.123 [print] {
"resourceType": "Procedure",
"id": "15655",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:25.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:21.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:21.725 [print] {
"resourceType": "Procedure",
"id": "15655",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:25.854+02:00",
"source": "#FqDdgYdrZRth7pA7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:22.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:22.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:27.048+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:27.048+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:22.918 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Enucleación",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:24.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"912"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:24.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ezflPdYN4Cy5UfPd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15656/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15656/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:24.559 [print] {
"resourceType": "Procedure",
"id": "15656",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:29.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:00:24.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:24.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"912"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:24.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ezflPdYN4Cy5UfPd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15656/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15656/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:24.559 [print] {
"resourceType": "Procedure",
"id": "15656",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:29.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:00:24.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:25.208 [print] {
"resourceType": "Procedure",
"id": "15656",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:29.302+02:00",
"source": "#ezflPdYN4Cy5UfPd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:25.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:26.901 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:30.623+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:30.623+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:26.901 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Cabeza"
}
}
],
"text": "Prótesis rodilla derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:27.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:27.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1RecpDojTevRKTp4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15657/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15657/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:27.518 [print] {
"resourceType": "Procedure",
"id": "15657",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:32.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Cabeza"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:00:27.518 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:27.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:27.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1RecpDojTevRKTp4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15657/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15657/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:27.518 [print] {
"resourceType": "Procedure",
"id": "15657",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:32.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Cabeza"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:00:27.518 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:28.155 [print] {
"resourceType": "Procedure",
"id": "15657",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:32.261+02:00",
"source": "#1RecpDojTevRKTp4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Cabeza"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:28.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:29.380 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:33.475+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:33.475+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:29.380 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "exéresis de recidiva de rabdomiosarcoma mediante orbitotomía. Se extrae una pieza tumoral encapsulada y restos tumorales accediendo a ella por el reborde orbitario superonasal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:30.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1087"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:30.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gDTYcOI5LLCVc7O8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15658/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15658/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:30.014 [print] {
"resourceType": "Procedure",
"id": "15658",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:34.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:30.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:30.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1087"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:30.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gDTYcOI5LLCVc7O8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15658/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15658/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:30.014 [print] {
"resourceType": "Procedure",
"id": "15658",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:34.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:30.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:30.599 [print] {
"resourceType": "Procedure",
"id": "15658",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:34.762+02:00",
"source": "#gDTYcOI5LLCVc7O8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:31.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:31.818 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:35.966+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:35.966+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:31.818 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Craniotomía fronto- temporal izquierda y biopsia excisional de tumoración óptica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:32.419 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:32.419 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yR9ZZqMMLCdBq3WK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15659/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15659/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:32.419 [print] {
"resourceType": "Procedure",
"id": "15659",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:37.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:00:32.419 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:32.419 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:32.419 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yR9ZZqMMLCdBq3WK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15659/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15659/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:32.419 [print] {
"resourceType": "Procedure",
"id": "15659",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:37.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:00:32.419 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:33.020 [print] {
"resourceType": "Procedure",
"id": "15659",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:37.163+02:00",
"source": "#yR9ZZqMMLCdBq3WK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
http call failed after 200 milliseconds for url: https://psp-sp-fhir.prep.sanit.cineca.it/fhir/Procedure/15659 karate/src/features/api/xam.feature:37
Then
status 200
And
print response
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:33.220 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "ojo"
}
}
],
"text": "resección en bloque del tumor, entre 1/3 medio femoral y 1/3 proximal pierna",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:33.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"883"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:33.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fndgHTT3EgxWtdSP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15660/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15660/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:33.810 [print] {
"resourceType": "Procedure",
"id": "15660",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:38.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "ojo"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:33.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:33.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"883"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:33.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fndgHTT3EgxWtdSP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15660/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15660/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:33.810 [print] {
"resourceType": "Procedure",
"id": "15660",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:38.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "ojo"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:00:33.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:34.396 [print] {
"resourceType": "Procedure",
"id": "15660",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:38.553+02:00",
"source": "#fndgHTT3EgxWtdSP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "ojo"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:36.001 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:36.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:40.737+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:40.737+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:36.623 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Laparotomia supraumbilical izquierda. Extirpación tumoral casi completa y biopsias",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:37.225 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"977"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:37.225 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pte5ZhG53cV6B7xh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15661/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15661/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:37.225 [print] {
"resourceType": "Procedure",
"id": "15661",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:41.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:00:37.225 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:37.225 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"977"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:37.225 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pte5ZhG53cV6B7xh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15661/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15661/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:37.225 [print] {
"resourceType": "Procedure",
"id": "15661",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:41.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:00:37.225 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:38.043 [print] {
"resourceType": "Procedure",
"id": "15661",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:41.960+02:00",
"source": "#pte5ZhG53cV6B7xh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:38.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:39.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:43.375+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:43.375+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:39.247 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Enucleación ojo derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:39.886 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"935"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:39.886 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lvhfWzwi9J0s7jAR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15662/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15662/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:39.886 [print] {
"resourceType": "Procedure",
"id": "15662",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:44.628+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:39.886 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:39.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"935"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:39.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lvhfWzwi9J0s7jAR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15662/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15662/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:39.902 [print] {
"resourceType": "Procedure",
"id": "15662",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:44.628+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:39.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:40.524 [print] {
"resourceType": "Procedure",
"id": "15662",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:44.628+02:00",
"source": "#lvhfWzwi9J0s7jAR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:41.326 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:42.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:46.065+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:46.065+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:42.101 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Laminectomía T11",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:42.702 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"573"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:42.702 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YV9HYiFIY8Nw9I1w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15663/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15663/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:42.702 [print] {
"resourceType": "Procedure",
"id": "15663",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:47.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:00:42.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:42.702 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"573"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:42.702 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YV9HYiFIY8Nw9I1w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15663/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15663/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:42.702 [print] {
"resourceType": "Procedure",
"id": "15663",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:47.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:00:42.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:43.906 [print] {
"resourceType": "Procedure",
"id": "15663",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:47.436+02:00",
"source": "#YV9HYiFIY8Nw9I1w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:44.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:45.145 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:49.245+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:49.245+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:45.145 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Toractomía posterior izquierda. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:45.761 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"838"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:45.761 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JbMUHLa3ZnasWBof"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15664/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15664/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:45.761 [print] {
"resourceType": "Procedure",
"id": "15664",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:50.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:00:45.761 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:45.761 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"838"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:45.761 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JbMUHLa3ZnasWBof"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15664/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15664/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:45.761 [print] {
"resourceType": "Procedure",
"id": "15664",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:50.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:00:45.761 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:46.366 [print] {
"resourceType": "Procedure",
"id": "15664",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:50.505+02:00",
"source": "#JbMUHLa3ZnasWBof",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:46.984 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:47.570 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:51.729+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:51.729+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:47.570 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:48.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"919"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:48.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eKmZg4JeIrqmmx9l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15665/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15665/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:48.156 [print] {
"resourceType": "Procedure",
"id": "15665",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:52.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:48.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:48.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"919"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:48.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eKmZg4JeIrqmmx9l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15665/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15665/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:48.156 [print] {
"resourceType": "Procedure",
"id": "15665",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:52.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:48.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:48.726 [print] {
"resourceType": "Procedure",
"id": "15665",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:52.889+02:00",
"source": "#eKmZg4JeIrqmmx9l",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:49.322 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:50.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:54.063+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:54.063+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:50.028 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "huesos,"
}
}
],
"text": "Laparotomía y exéresis de la tumoración abdominal. Resección intestinal ileo- cecal y anastomosis termino - terminal ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:50.652 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1030"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:50.652 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0LDtAUioCmVNISsQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15666/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15666/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:50.652 [print] {
"resourceType": "Procedure",
"id": "15666",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:55.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "huesos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:50.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:50.652 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1030"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:50.652 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0LDtAUioCmVNISsQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15666/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15666/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:50.652 [print] {
"resourceType": "Procedure",
"id": "15666",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:55.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "huesos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:00:50.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:51.254 [print] {
"resourceType": "Procedure",
"id": "15666",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:55.391+02:00",
"source": "#0LDtAUioCmVNISsQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "huesos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:51.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:52.518 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:56.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:56.630+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:52.518 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Prótesis rodilla derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:53.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"935"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:53.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MdIW4dKjqme7OJO8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15667/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15667/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:53.120 [print] {
"resourceType": "Procedure",
"id": "15667",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:57.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:00:53.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:53.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"935"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:53.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MdIW4dKjqme7OJO8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15667/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:00:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15667/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:53.120 [print] {
"resourceType": "Procedure",
"id": "15667",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:57.863+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:00:53.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:53.743 [print] {
"resourceType": "Procedure",
"id": "15667",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:00:57.863+02:00",
"source": "#MdIW4dKjqme7OJO8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:54.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:54.970 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:00:59.069+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:00:59.069+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:54.970 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Exéresis de la lesión abdominal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:55.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"596"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:55.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MgrzngQ0yFMBzr4G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15668/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15668/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:55.604 [print] {
"resourceType": "Procedure",
"id": "15668",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:00.326+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:00:55.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:55.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"596"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:55.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MgrzngQ0yFMBzr4G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15668/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15668/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:00:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:55.604 [print] {
"resourceType": "Procedure",
"id": "15668",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:00.326+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:00:55.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:56.205 [print] {
"resourceType": "Procedure",
"id": "15668",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:00.326+02:00",
"source": "#MgrzngQ0yFMBzr4G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:56.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:57.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:01.615+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:01.615+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:00:57.508 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "riñones,"
}
}
],
"text": "Craneotomía y exérsis tumoración intraconal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:58.480 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"832"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:58.480 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Afx0X3eGuNIeMBfS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15669/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15669/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:58.480 [print] {
"resourceType": "Procedure",
"id": "15669",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:02.883+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "riñones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01"
}
> *
print COOKIES
11:00:58.480 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:58.480 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"832"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:58.480 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Afx0X3eGuNIeMBfS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15669/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15669/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:58.480 [print] {
"resourceType": "Procedure",
"id": "15669",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:02.883+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "riñones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01"
}
> *
print COOKIES
11:00:58.480 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:59.113 [print] {
"resourceType": "Procedure",
"id": "15669",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:02.883+02:00",
"source": "#Afx0X3eGuNIeMBfS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "riñones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-07-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:59.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:00.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:04.473+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:04.473+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:00.308 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"text": "toracotomía y extirpación de adenopatía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:00.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1081"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:00.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mWIz8XkrnO4nuXpd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15670/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15670/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:00.915 [print] {
"resourceType": "Procedure",
"id": "15670",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:05.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:01:00.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:00.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1081"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:00.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mWIz8XkrnO4nuXpd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15670/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15670/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:00.915 [print] {
"resourceType": "Procedure",
"id": "15670",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:05.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:01:00.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:01.528 [print] {
"resourceType": "Procedure",
"id": "15670",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:05.661+02:00",
"source": "#mWIz8XkrnO4nuXpd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:02.122 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:02.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:06.873+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:06.873+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:02.708 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Exéresis T12 + artrodesis 2008",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:03.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"581"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:03.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ldOIVXDlYSfImaQ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15671/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15671/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:03.361 [print] {
"resourceType": "Procedure",
"id": "15671",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:08.094+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:03.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:03.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"581"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:03.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ldOIVXDlYSfImaQ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15671/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15671/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:03.361 [print] {
"resourceType": "Procedure",
"id": "15671",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:08.094+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:03.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:03.925 [print] {
"resourceType": "Procedure",
"id": "15671",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:08.094+02:00",
"source": "#ldOIVXDlYSfImaQ7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:04.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:06.177 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:09.294+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:09.294+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:06.177 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "resección restos tumorales en cuadrante superonasal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:06.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"951"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:06.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bOebcjJWrDhH12xA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15672/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15672/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:06.794 [print] {
"resourceType": "Procedure",
"id": "15672",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:11.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:06.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:06.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"951"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:06.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bOebcjJWrDhH12xA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15672/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15672/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:06.794 [print] {
"resourceType": "Procedure",
"id": "15672",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:11.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:06.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:07.395 [print] {
"resourceType": "Procedure",
"id": "15672",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:11.525+02:00",
"source": "#bOebcjJWrDhH12xA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:07.996 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:08.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:12.739+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:12.739+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:08.618 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "timo."
}
}
],
"text": "Nefrectomía derecha + exéresis del tumor + linfadenectomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:09.223 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"871"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:09.223 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sGWy0HLNRUa1OULG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15673/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15673/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:09.223 [print] {
"resourceType": "Procedure",
"id": "15673",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:13.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "timo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:01:09.223 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:09.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"871"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:09.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sGWy0HLNRUa1OULG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15673/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15673/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:09.239 [print] {
"resourceType": "Procedure",
"id": "15673",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:13.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "timo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:01:09.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:09.857 [print] {
"resourceType": "Procedure",
"id": "15673",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:13.972+02:00",
"source": "#sGWy0HLNRUa1OULG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "timo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:10.578 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:11.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:15.321+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:15.321+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:11.195 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Parotidectomía superficial derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:11.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"825"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:11.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XjLMGgBstBECLkJa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15674/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15674/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:11.834 [print] {
"resourceType": "Procedure",
"id": "15674",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:16.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:11.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:11.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"825"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:11.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XjLMGgBstBECLkJa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15674/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15674/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:11.834 [print] {
"resourceType": "Procedure",
"id": "15674",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:16.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:11.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:12.429 [print] {
"resourceType": "Procedure",
"id": "15674",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:16.574+02:00",
"source": "#XjLMGgBstBECLkJa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:13.016 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:13.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:17.764+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:17.764+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:13.606 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "páncreas"
}
}
],
"text": "exéresis de la 10ª costilla izquierda con reconstrucción de la pared costal con lactosorb",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:14.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1008"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:14.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enUfEVg5dwODgXf1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15675/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15675/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:14.239 [print] {
"resourceType": "Procedure",
"id": "15675",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:18.965+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "páncreas"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:01:14.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:14.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1008"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:14.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enUfEVg5dwODgXf1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15675/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15675/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:14.239 [print] {
"resourceType": "Procedure",
"id": "15675",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:18.965+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "páncreas"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:01:14.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:14.866 [print] {
"resourceType": "Procedure",
"id": "15675",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:18.965+02:00",
"source": "#enUfEVg5dwODgXf1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "páncreas"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:15.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:16.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:20.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:20.227+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:16.085 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "exéresis tumoral de la masa paraaórtica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:16.702 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"940"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:16.702 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lMqrUrxhwKmGxeqx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15676/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15676/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:16.702 [print] {
"resourceType": "Procedure",
"id": "15676",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:21.445+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:01:16.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:16.702 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"940"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:16.702 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lMqrUrxhwKmGxeqx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15676/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15676/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:16.702 [print] {
"resourceType": "Procedure",
"id": "15676",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:21.445+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:01:16.702 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:17.288 [print] {
"resourceType": "Procedure",
"id": "15676",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:21.445+02:00",
"source": "#lMqrUrxhwKmGxeqx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:17.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:18.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:22.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:22.609+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:18.463 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "riñones,"
}
}
],
"text": "Craniotomía suboccipital y resección de la tumoración. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:19.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1088"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:19.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"40quzgW0vxR4vhcI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15677/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15677/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:19.084 [print] {
"resourceType": "Procedure",
"id": "15677",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:23.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "riñones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:01:19.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:19.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1088"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:19.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"40quzgW0vxR4vhcI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15677/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15677/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:19.084 [print] {
"resourceType": "Procedure",
"id": "15677",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:23.822+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "riñones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:01:19.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:19.670 [print] {
"resourceType": "Procedure",
"id": "15677",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:23.822+02:00",
"source": "#40quzgW0vxR4vhcI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "riñones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-02-11",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:20.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:20.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:25.040+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:25.040+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:20.948 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "toracotomía derecha 5-6º espacio. resección resto paravertebral derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:21.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"966"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:21.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OmLHIANUJSUUYJzb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15678/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15678/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:21.585 [print] {
"resourceType": "Procedure",
"id": "15678",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:26.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:21.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:21.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"966"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:21.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OmLHIANUJSUUYJzb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15678/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15678/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:21.585 [print] {
"resourceType": "Procedure",
"id": "15678",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:26.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:21.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:22.234 [print] {
"resourceType": "Procedure",
"id": "15678",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:26.319+02:00",
"source": "#OmLHIANUJSUUYJzb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:22.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:23.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:27.621+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:27.621+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:23.507 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "esplenectomía + apendicectomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:24.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"840"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:24.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l8D2dJuV3J4bWWOD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15679/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15679/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:24.101 [print] {
"resourceType": "Procedure",
"id": "15679",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:28.851+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:01:24.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:24.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"840"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:24.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l8D2dJuV3J4bWWOD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15679/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15679/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:24.101 [print] {
"resourceType": "Procedure",
"id": "15679",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:28.851+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:01:24.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:24.718 [print] {
"resourceType": "Procedure",
"id": "15679",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:28.851+02:00",
"source": "#l8D2dJuV3J4bWWOD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:25.320 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:25.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:30.056+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:30.056+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:25.975 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Extirpación masa partes blandas",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:26.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"828"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:26.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4gzpqBCD7RWhhy0x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15680/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15680/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:26.607 [print] {
"resourceType": "Procedure",
"id": "15680",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:31.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:01:26.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:26.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"828"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:26.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4gzpqBCD7RWhhy0x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15680/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15680/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:26.607 [print] {
"resourceType": "Procedure",
"id": "15680",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:31.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:01:26.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:27.426 [print] {
"resourceType": "Procedure",
"id": "15680",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:31.337+02:00",
"source": "#4gzpqBCD7RWhhy0x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:28.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:28.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:32.802+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:32.802+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:28.691 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Colocación de drenaje ventricular externo y cierre de fístula",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:29.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"957"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:29.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qXFKxjk2TRsaofG4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15681/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15681/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:29.286 [print] {
"resourceType": "Procedure",
"id": "15681",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:34.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:01:29.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:29.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"957"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:29.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qXFKxjk2TRsaofG4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15681/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15681/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:29.286 [print] {
"resourceType": "Procedure",
"id": "15681",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:34.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:01:29.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:29.894 [print] {
"resourceType": "Procedure",
"id": "15681",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:34.021+02:00",
"source": "#qXFKxjk2TRsaofG4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:30.543 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:31.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:35.290+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:35.290+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:31.132 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Resección tumoral parcial",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:31.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"922"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:31.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RynV6IGa1ngpvfw3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15682/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15682/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:31.769 [print] {
"resourceType": "Procedure",
"id": "15682",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:36.499+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:31.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:31.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"922"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:31.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RynV6IGa1ngpvfw3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15682/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15682/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:31.769 [print] {
"resourceType": "Procedure",
"id": "15682",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:36.499+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:31.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:32.455 [print] {
"resourceType": "Procedure",
"id": "15682",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:36.499+02:00",
"source": "#RynV6IGa1ngpvfw3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:33.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:33.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:37.791+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:37.791+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:33.673 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Biopsia masa mediastínica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:34.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"449"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:34.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTDds2TRRxRTMr3G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15683/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15683/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:34.313 [print] {
"resourceType": "Procedure",
"id": "15683",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:39.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:01:34.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:34.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"449"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:34.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yTDds2TRRxRTMr3G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15683/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15683/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:34.313 [print] {
"resourceType": "Procedure",
"id": "15683",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:39.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:01:34.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:35.134 [print] {
"resourceType": "Procedure",
"id": "15683",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:39.052+02:00",
"source": "#yTDds2TRRxRTMr3G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:35.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:36.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:40.715+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:40.715+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:36.608 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "vejiga."
}
}
],
"text": "Exéresis parcial de lipodistrofia en monte de venus (complicación)",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:37.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"846"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:37.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2GKKGxby1KTTLFzn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15684/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15684/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:37.209 [print] {
"resourceType": "Procedure",
"id": "15684",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:41.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "vejiga."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01"
}
> *
print COOKIES
11:01:37.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:37.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"846"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:37.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2GKKGxby1KTTLFzn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15684/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15684/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:37.209 [print] {
"resourceType": "Procedure",
"id": "15684",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:41.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "vejiga."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01"
}
> *
print COOKIES
11:01:37.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:37.773 [print] {
"resourceType": "Procedure",
"id": "15684",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:41.950+02:00",
"source": "#2GKKGxby1KTTLFzn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "vejiga."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:38.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:38.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:43.112+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:43.112+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:38.992 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"text": "Metastasectomía LSD por videotoracoscopia",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:39.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"854"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:39.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kuI0DqIhr1r46z5Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15685/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15685/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:39.600 [print] {
"resourceType": "Procedure",
"id": "15685",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:44.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:01:39.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:39.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"854"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:39.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kuI0DqIhr1r46z5Q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15685/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15685/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:39.600 [print] {
"resourceType": "Procedure",
"id": "15685",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:44.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:01:39.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:40.202 [print] {
"resourceType": "Procedure",
"id": "15685",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:44.337+02:00",
"source": "#kuI0DqIhr1r46z5Q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "piel."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-08-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:40.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:41.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:45.587+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:45.587+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:41.424 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Metastasectomía toracoscópica segmentos posteriores LID",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:42.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"848"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:42.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMhFH8MuRQiZLrSs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15686/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15686/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:42.072 [print] {
"resourceType": "Procedure",
"id": "15686",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:46.805+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:42.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:42.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"848"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:42.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMhFH8MuRQiZLrSs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15686/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15686/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:42.072 [print] {
"resourceType": "Procedure",
"id": "15686",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:46.805+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:01:42.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:42.643 [print] {
"resourceType": "Procedure",
"id": "15686",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:46.805+02:00",
"source": "#UMhFH8MuRQiZLrSs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:43.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:45.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:47.973+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:47.973+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:45.281 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Extirpación completa del tumor en bíceps femoral derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:45.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"949"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:45.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LPIypaPk5lLvZxr0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15687/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15687/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:45.987 [print] {
"resourceType": "Procedure",
"id": "15687",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:50.734+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:01:45.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:45.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"949"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:45.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LPIypaPk5lLvZxr0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15687/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15687/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:45.987 [print] {
"resourceType": "Procedure",
"id": "15687",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:50.734+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:01:45.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:52.570 [print] {
"resourceType": "Procedure",
"id": "15687",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:50.734+02:00",
"source": "#LPIypaPk5lLvZxr0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:53.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:54.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:01:58.338+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:01:58.338+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:54.189 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"text": "colocación de VDVP y resección macroscópicamente total",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:54.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"967"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:54.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XRITbX8HhrrUufdV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15688/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15688/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:54.775 [print] {
"resourceType": "Procedure",
"id": "15688",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:59.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:54.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:54.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"967"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:54.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XRITbX8HhrrUufdV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15688/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:01:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15688/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:01:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:54.775 [print] {
"resourceType": "Procedure",
"id": "15688",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:59.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:54.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:55.761 [print] {
"resourceType": "Procedure",
"id": "15688",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:01:59.517+02:00",
"source": "#XRITbX8HhrrUufdV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "Pelvis:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:56.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:57.968 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:01.127+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:01.127+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:01:57.968 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "útero,"
}
}
],
"text": "cervicotomía + esternotomía media + toracotomía 3er espacio intercostal, con disección del tumor y exéresis completa excepto en la zona que engloba el plexo braquial quedando una pastilla de tumor",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:58.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:58.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o0lLhvfc1Db6ZWHo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15689/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15689/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:58.554 [print] {
"resourceType": "Procedure",
"id": "15689",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:03.297+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "útero,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:58.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:58.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:58.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o0lLhvfc1Db6ZWHo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15689/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15689/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:58.554 [print] {
"resourceType": "Procedure",
"id": "15689",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:03.297+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "útero,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:01:58.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:59.187 [print] {
"resourceType": "Procedure",
"id": "15689",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:03.297+02:00",
"source": "#o0lLhvfc1Db6ZWHo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "útero,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-04",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:59.789 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:00.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:04.534+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:04.534+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:00.390 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "oído."
}
}
],
"text": "Epifisiodesis proximal tibia derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:00.979 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"944"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:00.979 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4mqMr5vSVjeDl4dV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15690/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15690/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:00.979 [print] {
"resourceType": "Procedure",
"id": "15690",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:05.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "oído."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:02:00.979 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:00.979 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"944"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:00.979 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4mqMr5vSVjeDl4dV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15690/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15690/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:00.979 [print] {
"resourceType": "Procedure",
"id": "15690",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:05.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "oído."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:02:00.979 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:01.549 [print] {
"resourceType": "Procedure",
"id": "15690",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:05.714+02:00",
"source": "#4mqMr5vSVjeDl4dV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "oído."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:02.139 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:02.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:06.887+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:06.887+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:02.787 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Incisión transversa supraumbilical, exéresis resto tumoral, adenopatía y apéndice",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:03.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:03.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iaNH5aQhIVb87EE2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15691/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15691/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:03.405 [print] {
"resourceType": "Procedure",
"id": "15691",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:08.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:02:03.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:03.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"980"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:03.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iaNH5aQhIVb87EE2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15691/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15691/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:03.405 [print] {
"resourceType": "Procedure",
"id": "15691",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:08.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:02:03.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:05.047 [print] {
"resourceType": "Procedure",
"id": "15691",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:08.147+02:00",
"source": "#iaNH5aQhIVb87EE2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-01-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:05.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:06.482 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:10.621+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:10.621+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:06.498 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Resecció completa tumoración fosa posterior",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:07.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"950"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:07.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TpiqnGYNNGSBO98O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15692/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15692/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:07.099 [print] {
"resourceType": "Procedure",
"id": "15692",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:11.846+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:02:07.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:07.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"950"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:07.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TpiqnGYNNGSBO98O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15692/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15692/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:07.099 [print] {
"resourceType": "Procedure",
"id": "15692",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:11.846+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:02:07.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:07.716 [print] {
"resourceType": "Procedure",
"id": "15692",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:11.846+02:00",
"source": "#TpiqnGYNNGSBO98O",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:08.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:09.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:13.136+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:13.136+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:09.040 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Injerto graso",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:09.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1019"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:09.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P0cotcok6bbI4S4A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15693/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15693/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:09.620 [print] {
"resourceType": "Procedure",
"id": "15693",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:14.364+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:09.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:09.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1019"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:09.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"P0cotcok6bbI4S4A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15693/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15693/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:09.620 [print] {
"resourceType": "Procedure",
"id": "15693",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:14.364+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:09.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:10.344 [print] {
"resourceType": "Procedure",
"id": "15693",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:14.364+02:00",
"source": "#P0cotcok6bbI4S4A",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:10.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:11.625 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:15.739+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:15.739+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:11.625 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Laparotomía y exéresis de la tumoración abdominal. Resección intestinal ileo- cecal y anastomosis termino - terminal ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:12.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1034"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:12.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QrxA5Au6FmTTJvXg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15694/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15694/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:12.211 [print] {
"resourceType": "Procedure",
"id": "15694",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:16.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:02:12.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:12.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1034"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:12.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QrxA5Au6FmTTJvXg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15694/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15694/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:12.211 [print] {
"resourceType": "Procedure",
"id": "15694",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:16.959+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:02:12.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:12.843 [print] {
"resourceType": "Procedure",
"id": "15694",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:16.959+02:00",
"source": "#QrxA5Au6FmTTJvXg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:13.483 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:14.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:18.229+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:18.229+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:14.132 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Retirada catéter nefrostomía, colocación catéter doble J. Ooferectomía izquierda, pexia ovárica derecha. Exéresis tumoral completa.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:14.749 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1076"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:14.749 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UI7aGxziB5kaOyuG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15695/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15695/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:14.749 [print] {
"resourceType": "Procedure",
"id": "15695",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:19.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:02:14.749 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:14.755 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1076"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:14.755 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UI7aGxziB5kaOyuG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15695/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15695/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:14.755 [print] {
"resourceType": "Procedure",
"id": "15695",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:19.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:02:14.755 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:15.435 [print] {
"resourceType": "Procedure",
"id": "15695",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:19.488+02:00",
"source": "#UI7aGxziB5kaOyuG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-05-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:16.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:16.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:20.807+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:20.807+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:16.677 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Toracotomía y extirpación resto tumoral pulmonar en lóbulo medio",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:17.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"863"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:17.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ydT0xnJ7mKGjxBcL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15696/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15696/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:17.278 [print] {
"resourceType": "Procedure",
"id": "15696",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:22.009+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:02:17.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:17.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"863"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:17.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ydT0xnJ7mKGjxBcL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15696/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15696/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:17.278 [print] {
"resourceType": "Procedure",
"id": "15696",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:22.009+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:02:17.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:17.858 [print] {
"resourceType": "Procedure",
"id": "15696",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:22.009+02:00",
"source": "#ydT0xnJ7mKGjxBcL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:18.444 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:19.062 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:23.183+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:23.183+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:19.062 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Exéresis tumoral con ligadura de pedículos venosos y arteriales y disección del riñon. Laparotomía.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:19.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"895"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:19.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"71YPAQGsLfEPBpM0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15697/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15697/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:19.948 [print] {
"resourceType": "Procedure",
"id": "15697",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:24.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:02:19.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:19.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"895"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:19.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"71YPAQGsLfEPBpM0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15697/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15697/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:19.948 [print] {
"resourceType": "Procedure",
"id": "15697",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:24.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:02:19.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:20.549 [print] {
"resourceType": "Procedure",
"id": "15697",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:24.661+02:00",
"source": "#71YPAQGsLfEPBpM0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:21.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:22.075 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:26.196+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:26.196+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:22.075 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Exéresis de la lesión abdominal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:22.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"583"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:22.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Wejh4ifqhkuEIx4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15698/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15698/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:22.692 [print] {
"resourceType": "Procedure",
"id": "15698",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:27.437+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:02:22.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:22.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"583"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:22.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Wejh4ifqhkuEIx4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15698/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15698/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:22.692 [print] {
"resourceType": "Procedure",
"id": "15698",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:27.437+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:02:22.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:23.257 [print] {
"resourceType": "Procedure",
"id": "15698",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:27.437+02:00",
"source": "#2Wejh4ifqhkuEIx4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:23.916 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:24.486 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:28.659+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:28.659+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:24.486 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "próstata"
}
}
],
"text": "Laminoplastia T10- T12 + exéresis cuerpo vertebral T12",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:25.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"841"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:25.087 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yBUVPlPTjGrOJfHu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15699/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15699/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:25.087 [print] {
"resourceType": "Procedure",
"id": "15699",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:29.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "próstata"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22"
}
> *
print COOKIES
11:02:25.087 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:25.103 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"841"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:25.103 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yBUVPlPTjGrOJfHu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15699/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15699/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:25.103 [print] {
"resourceType": "Procedure",
"id": "15699",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:29.840+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "próstata"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22"
}
> *
print COOKIES
11:02:25.103 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:25.721 [print] {
"resourceType": "Procedure",
"id": "15699",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:29.840+02:00",
"source": "#yBUVPlPTjGrOJfHu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "próstata"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:26.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:26.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:31.057+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:31.057+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:26.944 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "testículos,"
}
}
],
"text": "Exéresis tumoral con ligadura de pedículos venosos y arteriales y disección del riñon. Laparotomía.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:27.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1024"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:27.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MugV6oWZ9xj3yuAP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15700/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15700/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:27.578 [print] {
"resourceType": "Procedure",
"id": "15700",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:32.303+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "testículos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:02:27.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:27.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1024"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:27.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MugV6oWZ9xj3yuAP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15700/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15700/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:27.578 [print] {
"resourceType": "Procedure",
"id": "15700",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:32.303+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "testículos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:02:27.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:28.183 [print] {
"resourceType": "Procedure",
"id": "15700",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:32.303+02:00",
"source": "#MugV6oWZ9xj3yuAP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "testículos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:28.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:29.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:33.679+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:33.679+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:29.571 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Extracción plaza rota por fatiga y colocación de nueva placa en cara externa y una nueva en cara interna",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:30.188 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"769"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:30.188 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i6Gext8zeKVoKz5S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15701/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15701/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:30.188 [print] {
"resourceType": "Procedure",
"id": "15701",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:34.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:30.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:30.188 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"769"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:30.188 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i6Gext8zeKVoKz5S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15701/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15701/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:30.188 [print] {
"resourceType": "Procedure",
"id": "15701",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:34.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:30.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:30.811 [print] {
"resourceType": "Procedure",
"id": "15701",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:34.932+02:00",
"source": "#i6Gext8zeKVoKz5S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:31.460 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:32.076 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:36.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:36.186+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:32.076 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Nefrectomía parcial polo inferior riñón izquierdo ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:32.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"843"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:32.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u3v0aZppsraqOj8W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15702/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15702/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:32.662 [print] {
"resourceType": "Procedure",
"id": "15702",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:37.405+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:02:32.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:32.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"843"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:32.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u3v0aZppsraqOj8W"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15702/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15702/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:32.662 [print] {
"resourceType": "Procedure",
"id": "15702",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:37.405+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:02:32.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:33.249 [print] {
"resourceType": "Procedure",
"id": "15702",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:37.405+02:00",
"source": "#u3v0aZppsraqOj8W",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:33.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:34.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:38.646+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:38.646+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:34.526 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Exéresis completa de la masa de mesoíleon, apendicectomía profiláctica, exérsis divertículo de MEckel no complicado, biopsia testicular izquierda abierta.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:35.128 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1083"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:35.128 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5WaXdmV9itbkG8lP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15703/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15703/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:35.128 [print] {
"resourceType": "Procedure",
"id": "15703",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:39.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:35.128 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:35.128 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1083"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:35.128 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5WaXdmV9itbkG8lP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15703/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15703/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:35.128 [print] {
"resourceType": "Procedure",
"id": "15703",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:39.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:35.128 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:35.746 [print] {
"resourceType": "Procedure",
"id": "15703",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:39.867+02:00",
"source": "#5WaXdmV9itbkG8lP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-24",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:36.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:37.342 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:41.109+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:41.109+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:37.342 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "cuello:"
}
}
],
"text": "Injerto graso",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:37.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"921"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:37.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XukaMgeDifWdyJrY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15704/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15704/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:37.991 [print] {
"resourceType": "Procedure",
"id": "15704",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:42.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "cuello:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:02:37.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:37.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"921"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:37.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XukaMgeDifWdyJrY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15704/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15704/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:37.991 [print] {
"resourceType": "Procedure",
"id": "15704",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:42.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "cuello:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:02:37.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:38.608 [print] {
"resourceType": "Procedure",
"id": "15704",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:42.719+02:00",
"source": "#XukaMgeDifWdyJrY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "cuello:"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:39.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:39.843 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:43.938+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:43.938+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:39.843 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "hígado,"
}
}
],
"text": "Colocación de VDVP",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:40.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1048"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:40.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2GxHnQLezxJ1KkdQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15705/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15705/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:40.730 [print] {
"resourceType": "Procedure",
"id": "15705",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:45.459+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "hígado,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:40.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:40.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1048"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:40.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2GxHnQLezxJ1KkdQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15705/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15705/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:40.730 [print] {
"resourceType": "Procedure",
"id": "15705",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:45.459+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "hígado,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:02:40.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:41.653 [print] {
"resourceType": "Procedure",
"id": "15705",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:45.459+02:00",
"source": "#2GxHnQLezxJ1KkdQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "hígado,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-10-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:42.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:42.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:47.054+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:47.054+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:42.919 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "resección de la diáfisis femoral y restauración del espacio ósea con halo \u2013 injerto y enclavado intramedular. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:43.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1015"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:43.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NuOGRTY2yBwG1iot"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15706/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15706/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:43.540 [print] {
"resourceType": "Procedure",
"id": "15706",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:48.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:02:43.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:43.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1015"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:43.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NuOGRTY2yBwG1iot"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15706/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15706/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:43.540 [print] {
"resourceType": "Procedure",
"id": "15706",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:48.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:02:43.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:44.142 [print] {
"resourceType": "Procedure",
"id": "15706",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:48.269+02:00",
"source": "#NuOGRTY2yBwG1iot",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:44.744 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:45.329 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:49.485+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:49.485+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:45.329 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Exérsis de la tumoración más resección de los 2/3 distales de fémur",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:45.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"967"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:45.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9CMT6djSsFP5AxVv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15707/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15707/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:45.936 [print] {
"resourceType": "Procedure",
"id": "15707",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:50.669+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:02:45.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:45.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"967"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:45.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9CMT6djSsFP5AxVv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15707/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15707/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:45.936 [print] {
"resourceType": "Procedure",
"id": "15707",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:50.669+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:02:45.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:46.532 [print] {
"resourceType": "Procedure",
"id": "15707",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:50.669+02:00",
"source": "#9CMT6djSsFP5AxVv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:47.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:47.720 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:51.904+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:51.904+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:47.720 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"text": "esplenectomía + apendicectomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:48.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"823"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:48.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJ5oGP5jI7bPZwOs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15708/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15708/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:48.352 [print] {
"resourceType": "Procedure",
"id": "15708",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:53.087+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:02:48.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:48.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"823"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:48.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJ5oGP5jI7bPZwOs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15708/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15708/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:48.352 [print] {
"resourceType": "Procedure",
"id": "15708",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:53.087+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:02:48.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:48.954 [print] {
"resourceType": "Procedure",
"id": "15708",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:53.087+02:00",
"source": "#KJ5oGP5jI7bPZwOs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:49.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:50.130 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:54.306+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:54.306+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:50.146 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "craniotomía suboccipital y resección de la tumoración. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:51.132 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"613"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:51.132 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j9qb0tAimSAVgt0N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15709/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15709/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:51.132 [print] {
"resourceType": "Procedure",
"id": "15709",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:55.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:02:51.132 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:51.132 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"613"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:51.132 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j9qb0tAimSAVgt0N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15709/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15709/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:51.132 [print] {
"resourceType": "Procedure",
"id": "15709",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:55.867+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:02:51.132 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:51.903 [print] {
"resourceType": "Procedure",
"id": "15709",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:55.867+02:00",
"source": "#j9qb0tAimSAVgt0N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:52.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:53.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:02:57.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:02:57.274+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:53.107 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Nefrectomía radical derecha + lindafenectomía + biopsia trombo vena cava",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:53.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"982"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:53.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cN6csGWyNX2CpdHI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15710/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15710/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:53.725 [print] {
"resourceType": "Procedure",
"id": "15710",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:58.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:02:53.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:53.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"982"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:53.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cN6csGWyNX2CpdHI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15710/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:02:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15710/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:02:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:53.725 [print] {
"resourceType": "Procedure",
"id": "15710",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:58.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:02:53.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:55.333 [print] {
"resourceType": "Procedure",
"id": "15710",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:02:58.474+02:00",
"source": "#cN6csGWyNX2CpdHI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-10-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:55.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:56.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:00.652+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:00.652+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:56.536 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:57.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"922"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:57.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ly5uvDRrYpkNnUsk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15711/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15711/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:57.170 [print] {
"resourceType": "Procedure",
"id": "15711",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:01.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:02:57.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:57.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"922"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:57.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ly5uvDRrYpkNnUsk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15711/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15711/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:57.170 [print] {
"resourceType": "Procedure",
"id": "15711",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:01.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:02:57.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:57.887 [print] {
"resourceType": "Procedure",
"id": "15711",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:01.911+02:00",
"source": "#Ly5uvDRrYpkNnUsk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-05-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:58.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:59.075 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:03.228+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:03.228+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:02:59.075 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "Intestino grueso"
}
}
],
"text": "toma de biopsia y laminectomía descompresiva ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:59.707 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"878"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:59.707 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OYilzT7E6eojhevl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15712/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15712/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:59.707 [print] {
"resourceType": "Procedure",
"id": "15712",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:04.438+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "Intestino grueso"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:02:59.707 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:59.707 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"878"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:59.707 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OYilzT7E6eojhevl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15712/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15712/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:59.707 [print] {
"resourceType": "Procedure",
"id": "15712",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:04.438+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "Intestino grueso"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:02:59.707 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:00.594 [print] {
"resourceType": "Procedure",
"id": "15712",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:04.438+02:00",
"source": "#OYilzT7E6eojhevl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "Intestino grueso"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:01.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:01.838 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:05.958+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:05.958+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:01.838 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:02.423 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"589"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:02.423 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2lPkSjAGAWm9quBo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15713/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15713/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:02.423 [print] {
"resourceType": "Procedure",
"id": "15713",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:07.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:03:02.423 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:02.423 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"589"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:02.423 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2lPkSjAGAWm9quBo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15713/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15713/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:02.423 [print] {
"resourceType": "Procedure",
"id": "15713",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:07.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:03:02.423 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:02.987 [print] {
"resourceType": "Procedure",
"id": "15713",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:07.169+02:00",
"source": "#2lPkSjAGAWm9quBo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-03-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:03.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:04.222 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:08.361+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:08.361+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:04.222 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Metastasectomía LSI y LII ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:04.792 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"926"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:04.792 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ybqz3EhCq0cb9z3S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15714/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15714/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:04.792 [print] {
"resourceType": "Procedure",
"id": "15714",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:09.537+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:03:04.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:04.792 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"926"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:04.792 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ybqz3EhCq0cb9z3S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15714/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15714/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:04.792 [print] {
"resourceType": "Procedure",
"id": "15714",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:09.537+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:03:04.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:05.463 [print] {
"resourceType": "Procedure",
"id": "15714",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:09.537+02:00",
"source": "#ybqz3EhCq0cb9z3S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:06.115 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:06.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:10.853+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:10.853+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:06.701 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:07.303 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"831"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:07.303 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TtkiBbVk3QDTtVOK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15715/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15715/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:07.303 [print] {
"resourceType": "Procedure",
"id": "15715",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:12.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:03:07.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:07.303 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"831"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:07.303 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TtkiBbVk3QDTtVOK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15715/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15715/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:07.303 [print] {
"resourceType": "Procedure",
"id": "15715",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:12.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:03:07.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:07.920 [print] {
"resourceType": "Procedure",
"id": "15715",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:12.047+02:00",
"source": "#TtkiBbVk3QDTtVOK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:08.537 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:09.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:13.282+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:13.282+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:09.161 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Craniotomía fronto- temporal izquierda y biopsia excisional de tumoración óptica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:09.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"875"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:09.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nDkbBpybzpsLYswL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15716/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15716/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:09.779 [print] {
"resourceType": "Procedure",
"id": "15716",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:14.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:03:09.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:09.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"875"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:09.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nDkbBpybzpsLYswL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15716/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15716/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:09.779 [print] {
"resourceType": "Procedure",
"id": "15716",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:14.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:03:09.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:10.427 [print] {
"resourceType": "Procedure",
"id": "15716",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:14.527+02:00",
"source": "#nDkbBpybzpsLYswL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:11.051 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:11.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:15.789+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:15.789+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:11.615 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "laparotomía y extirpación del resto paravesical derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:12.254 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:12.254 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RoUGnejwtqlCRdpU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15717/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15717/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:12.270 [print] {
"resourceType": "Procedure",
"id": "15717",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:16.997+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:03:12.270 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:12.270 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:12.270 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RoUGnejwtqlCRdpU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15717/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15717/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:12.270 [print] {
"resourceType": "Procedure",
"id": "15717",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:16.997+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:03:12.270 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:12.856 [print] {
"resourceType": "Procedure",
"id": "15717",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:16.997+02:00",
"source": "#RoUGnejwtqlCRdpU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-11-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:13.451 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:14.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:18.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:18.186+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:14.022 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"text": "Nefrectomía parcial polo inferior riñón izquierdo ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:14.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"846"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:14.639 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vPnuusJ6ODXmwG6J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15718/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15718/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:14.639 [print] {
"resourceType": "Procedure",
"id": "15718",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:19.390+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:03:14.639 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:14.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"846"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:14.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vPnuusJ6ODXmwG6J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15718/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15718/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:14.654 [print] {
"resourceType": "Procedure",
"id": "15718",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:19.390+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:03:14.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:15.263 [print] {
"resourceType": "Procedure",
"id": "15718",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:19.390+02:00",
"source": "#vPnuusJ6ODXmwG6J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:15.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:16.497 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:20.631+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:20.631+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:16.497 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Intestino grueso"
}
}
],
"text": "Injertos de piel por EICHc sobreinfectada (complicación)",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:17.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1092"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:17.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ugHUYVw6tqzsGQ4v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15719/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15719/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:17.146 [print] {
"resourceType": "Procedure",
"id": "15719",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:21.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Intestino grueso"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:17.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:17.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1092"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:17.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ugHUYVw6tqzsGQ4v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15719/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15719/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:17.146 [print] {
"resourceType": "Procedure",
"id": "15719",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:21.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Intestino grueso"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:17.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:17.701 [print] {
"resourceType": "Procedure",
"id": "15719",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:21.879+02:00",
"source": "#ugHUYVw6tqzsGQ4v",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "Intestino grueso"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-09-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:18.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:18.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:23.083+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:23.083+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:18.907 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Laparoscopia. Resección intestinal con bordes libres y anastomosis termino - terminal.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:19.481 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"982"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:19.481 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mPCWTI8r7aSRWy0X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15720/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15720/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:19.481 [print] {
"resourceType": "Procedure",
"id": "15720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:24.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:03:19.481 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:19.481 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"982"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:19.481 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mPCWTI8r7aSRWy0X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15720/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15720/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:19.481 [print] {
"resourceType": "Procedure",
"id": "15720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:24.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:03:19.481 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:20.145 [print] {
"resourceType": "Procedure",
"id": "15720",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:24.231+02:00",
"source": "#mPCWTI8r7aSRWy0X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:20.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:21.332 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:25.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:25.478+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:21.332 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Extirpación tumoración fosa posterior",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:21.949 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"936"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:21.949 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QTQAyvJMjqXPrDnu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15721/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15721/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:21.949 [print] {
"resourceType": "Procedure",
"id": "15721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:26.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:03:21.949 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:21.949 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"936"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:21.949 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QTQAyvJMjqXPrDnu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15721/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15721/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:21.949 [print] {
"resourceType": "Procedure",
"id": "15721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:26.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:03:21.949 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:22.567 [print] {
"resourceType": "Procedure",
"id": "15721",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:26.690+02:00",
"source": "#QTQAyvJMjqXPrDnu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-03",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:23.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:23.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:27.895+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:27.895+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:23.727 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Biopsia abierta con craniotomía suboocipital",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:24.360 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"839"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:24.360 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KsmQTqJlsg0Jb6zZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15722/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15722/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:24.360 [print] {
"resourceType": "Procedure",
"id": "15722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:29.100+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:03:24.360 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:24.360 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"839"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:24.360 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KsmQTqJlsg0Jb6zZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15722/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15722/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:24.360 [print] {
"resourceType": "Procedure",
"id": "15722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:29.100+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:03:24.360 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:24.962 [print] {
"resourceType": "Procedure",
"id": "15722",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:29.100+02:00",
"source": "#KsmQTqJlsg0Jb6zZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:25.616 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:26.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:30.361+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:30.361+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:26.202 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "músculos"
}
}
],
"text": "Histerectomía + salpinguectomía bilateral + ooferectomía derecha + linfadenectomía pélvica bilateral + pexia ovárica izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:26.804 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"915"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:26.804 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r1K3STwTTcfkVhD5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15723/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15723/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:26.804 [print] {
"resourceType": "Procedure",
"id": "15723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:31.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "músculos"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13"
}
> *
print COOKIES
11:03:26.804 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:26.804 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"915"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:26.804 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r1K3STwTTcfkVhD5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15723/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15723/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:26.804 [print] {
"resourceType": "Procedure",
"id": "15723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:31.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "músculos"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13"
}
> *
print COOKIES
11:03:26.804 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:27.422 [print] {
"resourceType": "Procedure",
"id": "15723",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:31.548+02:00",
"source": "#r1K3STwTTcfkVhD5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "músculos"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:28.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:28.641 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:32.748+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:32.748+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:28.641 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Artrodesis pie izquierdo neuropático. Reintervención 2013 (complicación)",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:29.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"968"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:29.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8oI4zWwSAGhy12E3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15724/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15724/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:29.243 [print] {
"resourceType": "Procedure",
"id": "15724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:33.977+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:03:29.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:29.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"968"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:29.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8oI4zWwSAGhy12E3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15724/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15724/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:29.243 [print] {
"resourceType": "Procedure",
"id": "15724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:33.977+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:03:29.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:29.829 [print] {
"resourceType": "Procedure",
"id": "15724",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:33.977+02:00",
"source": "#8oI4zWwSAGhy12E3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:30.446 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:31.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:35.168+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:35.168+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:31.284 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"text": "Ampliación bordes quirúrgicos + biopsia ganglio centinela",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:31.886 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"850"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:31.886 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M4rJhmhhvuPmTWh4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15725/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15725/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:31.886 [print] {
"resourceType": "Procedure",
"id": "15725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:36.620+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:03:31.886 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:31.886 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"850"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:31.886 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M4rJhmhhvuPmTWh4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15725/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15725/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:31.886 [print] {
"resourceType": "Procedure",
"id": "15725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:36.620+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:03:31.886 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:32.503 [print] {
"resourceType": "Procedure",
"id": "15725",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:36.620+02:00",
"source": "#M4rJhmhhvuPmTWh4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:33.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:33.761 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:37.869+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:37.869+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:33.761 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Exéresis adenopatía laterocervical derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:34.351 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1045"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:34.351 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jRiyBkKfwuPxrU4O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15726/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15726/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:34.351 [print] {
"resourceType": "Procedure",
"id": "15726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:39.097+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:34.351 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:34.366 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1045"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:34.366 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jRiyBkKfwuPxrU4O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15726/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15726/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:34.366 [print] {
"resourceType": "Procedure",
"id": "15726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:39.097+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:34.366 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:34.936 [print] {
"resourceType": "Procedure",
"id": "15726",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:39.097+02:00",
"source": "#jRiyBkKfwuPxrU4O",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:35.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:36.187 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:40.284+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:40.284+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:36.187 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Resección 30 cm íleon",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:36.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1044"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:36.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E4Mmz4nre8WfkNbY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15727/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15727/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:36.819 [print] {
"resourceType": "Procedure",
"id": "15727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:41.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:36.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:36.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1044"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:36.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"E4Mmz4nre8WfkNbY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15727/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15727/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:36.819 [print] {
"resourceType": "Procedure",
"id": "15727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:41.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:36.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:37.421 [print] {
"resourceType": "Procedure",
"id": "15727",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:41.548+02:00",
"source": "#E4Mmz4nre8WfkNbY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:38.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:38.625 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:42.759+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:42.759+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:38.625 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Exéresis parcial de lipodistrofia en monte de venus (complicación)",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:39.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"624"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:39.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n7Ld63tcbUQ882tk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15728/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15728/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:39.227 [print] {
"resourceType": "Procedure",
"id": "15728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:43.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:03:39.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:39.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"624"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:39.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n7Ld63tcbUQ882tk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15728/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15728/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:39.227 [print] {
"resourceType": "Procedure",
"id": "15728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:43.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:03:39.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:39.801 [print] {
"resourceType": "Procedure",
"id": "15728",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:43.956+02:00",
"source": "#n7Ld63tcbUQ882tk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:40.423 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:40.977 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:45.166+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:45.166+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:40.977 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "toracotomía derecha 5-6º espacio. resección resto paravertebral derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:41.610 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"740"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:41.610 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DjzTLY5tosoFChUS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15729/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15729/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:41.610 [print] {
"resourceType": "Procedure",
"id": "15729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:46.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:41.610 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:41.610 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"740"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:41.610 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DjzTLY5tosoFChUS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15729/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15729/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:41.610 [print] {
"resourceType": "Procedure",
"id": "15729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:46.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:41.610 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:42.343 [print] {
"resourceType": "Procedure",
"id": "15729",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:46.348+02:00",
"source": "#DjzTLY5tosoFChUS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:42.945 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:43.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:47.675+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:47.675+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:43.523 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Parotidectomía superficial derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:44.572 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1046"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:44.572 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eNDoC42d6grQ22JI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15730/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15730/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:44.572 [print] {
"resourceType": "Procedure",
"id": "15730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:49.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:44.572 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:44.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1046"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:44.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eNDoC42d6grQ22JI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15730/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15730/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:44.578 [print] {
"resourceType": "Procedure",
"id": "15730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:49.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:44.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:45.211 [print] {
"resourceType": "Procedure",
"id": "15730",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:49.315+02:00",
"source": "#eNDoC42d6grQ22JI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:45.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:46.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:50.580+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:50.580+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:46.461 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Retirada placa osteosíntesis",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:47.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"579"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:47.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jEtAU5c6n6MQ2hKi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15731/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15731/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:47.097 [print] {
"resourceType": "Procedure",
"id": "15731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:51.829+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:03:47.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:47.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"579"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:47.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jEtAU5c6n6MQ2hKi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15731/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15731/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:47.097 [print] {
"resourceType": "Procedure",
"id": "15731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:51.829+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:03:47.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:47.658 [print] {
"resourceType": "Procedure",
"id": "15731",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:51.829+02:00",
"source": "#jEtAU5c6n6MQ2hKi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:48.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:48.843 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:53.005+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:53.005+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:48.849 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "extirpación completa del tumor en vertiente anterior del vérmix cerebeloso y del nódulo en hemisferio cerebeloso derecho. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:49.450 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1146"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:49.450 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yFCqXUM1qWNgNpu2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15732/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15732/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:49.450 [print] {
"resourceType": "Procedure",
"id": "15732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:54.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:49.450 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:49.450 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1146"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:49.450 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yFCqXUM1qWNgNpu2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15732/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15732/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:49.450 [print] {
"resourceType": "Procedure",
"id": "15732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:54.173+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:49.450 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:50.045 [print] {
"resourceType": "Procedure",
"id": "15732",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:54.173+02:00",
"source": "#yFCqXUM1qWNgNpu2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-07-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:50.668 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:51.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:55.402+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:55.402+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:51.270 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Artrodesis posterior por escoliosis neuropática",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:51.891 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1059"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:51.891 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KQrrrPt2i4mRS7ru"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15733/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15733/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:51.891 [print] {
"resourceType": "Procedure",
"id": "15733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:56.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:51.891 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:51.891 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1059"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:51.891 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KQrrrPt2i4mRS7ru"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15733/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15733/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:51.891 [print] {
"resourceType": "Procedure",
"id": "15733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:56.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:51.891 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:52.560 [print] {
"resourceType": "Procedure",
"id": "15733",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:56.635+02:00",
"source": "#KQrrrPt2i4mRS7ru",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:53.183 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:53.801 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:03:57.914+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:03:57.914+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:53.801 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Extirpación parcial del tumor",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:54.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:54.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t3KuNQ1BEA16G6Gx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15734/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15734/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:54.418 [print] {
"resourceType": "Procedure",
"id": "15734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:59.159+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:54.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:54.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:54.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t3KuNQ1BEA16G6Gx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15734/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:03:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15734/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:03:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:54.418 [print] {
"resourceType": "Procedure",
"id": "15734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:59.159+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:03:54.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:55.188 [print] {
"resourceType": "Procedure",
"id": "15734",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:03:59.159+02:00",
"source": "#t3KuNQ1BEA16G6Gx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:55.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:56.429 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:00.549+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:00.549+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:56.429 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Resección incompleta de la tumoración torácica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:57.077 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"841"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:57.077 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AYMUk1Y6tjGBTT9o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15735/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15735/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:57.077 [print] {
"resourceType": "Procedure",
"id": "15735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:01.818+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:03:57.077 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:57.077 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"841"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:57.077 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AYMUk1Y6tjGBTT9o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15735/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15735/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:57.077 [print] {
"resourceType": "Procedure",
"id": "15735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:01.818+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:03:57.077 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:57.679 [print] {
"resourceType": "Procedure",
"id": "15735",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:01.818+02:00",
"source": "#AYMUk1Y6tjGBTT9o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:58.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:59.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:03.087+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:03.087+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:03:59.136 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": " Laminectomía y resección",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:59.790 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"579"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:59.790 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"13uO7LUB8BRjxgOp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15736/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15736/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:59.790 [print] {
"resourceType": "Procedure",
"id": "15736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:04.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:03:59.790 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:59.790 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"579"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:59.790 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"13uO7LUB8BRjxgOp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15736/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15736/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:59.790 [print] {
"resourceType": "Procedure",
"id": "15736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:04.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:03:59.790 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:03.455 [print] {
"resourceType": "Procedure",
"id": "15736",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:04.506+02:00",
"source": "#13uO7LUB8BRjxgOp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:04.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:04.643 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:08.800+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:08.800+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:04.643 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "craniotomía suboccipital y resección de la tumoración. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:05.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"969"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:05.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y9Ea0KvSAVuCviH2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15737/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15737/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:05.229 [print] {
"resourceType": "Procedure",
"id": "15737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:09.971+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:04:05.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:05.244 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"969"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:05.244 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y9Ea0KvSAVuCviH2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15737/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15737/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:05.244 [print] {
"resourceType": "Procedure",
"id": "15737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:09.971+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:04:05.244 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:05.846 [print] {
"resourceType": "Procedure",
"id": "15737",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:09.971+02:00",
"source": "#Y9Ea0KvSAVuCviH2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-09-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:06.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:07.037 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:11.212+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:11.212+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:07.037 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Resección L5, con sustitución de malla anterior y artrodesis L5-S1",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:07.670 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"984"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:07.670 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QujQkScCFSef8Tlh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15738/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15738/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:07.670 [print] {
"resourceType": "Procedure",
"id": "15738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:12.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:04:07.670 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:07.670 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"984"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:07.670 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QujQkScCFSef8Tlh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15738/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15738/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:07.670 [print] {
"resourceType": "Procedure",
"id": "15738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:12.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:04:07.670 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:08.287 [print] {
"resourceType": "Procedure",
"id": "15738",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:12.402+02:00",
"source": "#QujQkScCFSef8Tlh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:08.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:09.459 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:13.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:13.628+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:09.459 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:10.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"938"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:10.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z2O7OL6NJ1j6oxjK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15739/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:10.108 [print] {
"resourceType": "Procedure",
"id": "15739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:14.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:10.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:10.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"938"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:10.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"z2O7OL6NJ1j6oxjK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15739/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15739/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:10.123 [print] {
"resourceType": "Procedure",
"id": "15739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:14.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:10.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:10.748 [print] {
"resourceType": "Procedure",
"id": "15739",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:14.845+02:00",
"source": "#z2O7OL6NJ1j6oxjK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:11.574 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:12.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:16.120+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:16.120+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:12.176 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Biopsia masa mediastínica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:12.792 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"578"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:12.792 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HJFGzCp15F4ZQw2p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15740/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:12.792 [print] {
"resourceType": "Procedure",
"id": "15740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:17.531+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:12.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:12.792 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"578"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:12.792 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HJFGzCp15F4ZQw2p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15740/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15740/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:12.792 [print] {
"resourceType": "Procedure",
"id": "15740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:17.531+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:12.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:13.494 [print] {
"resourceType": "Procedure",
"id": "15740",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:17.531+02:00",
"source": "#HJFGzCp15F4ZQw2p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-07",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:14.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:14.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:18.888+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:18.888+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:14.727 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"text": "Tiroidectomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:15.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:15.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"78oqYcDoQgZKRCi1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15741/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:15.328 [print] {
"resourceType": "Procedure",
"id": "15741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:20.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:04:15.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:15.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:15.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"78oqYcDoQgZKRCi1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15741/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15741/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:15.328 [print] {
"resourceType": "Procedure",
"id": "15741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:20.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:04:15.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:15.955 [print] {
"resourceType": "Procedure",
"id": "15741",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:20.071+02:00",
"source": "#78oqYcDoQgZKRCi1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:16.572 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:17.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:21.318+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:21.318+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:17.158 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Catarata OD",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:17.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"905"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:17.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NfI39A0WVsvFlk3z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15742/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:17.779 [print] {
"resourceType": "Procedure",
"id": "15742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:22.520+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:17.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:17.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"905"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:17.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NfI39A0WVsvFlk3z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15742/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15742/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:17.779 [print] {
"resourceType": "Procedure",
"id": "15742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:22.520+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:17.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:18.496 [print] {
"resourceType": "Procedure",
"id": "15742",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:22.520+02:00",
"source": "#NfI39A0WVsvFlk3z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:19.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:19.931 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:23.828+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:23.828+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:19.931 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "laparotomía y extirpación del resto paravesical derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:20.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"950"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:20.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hcb24gKmGlN6BW6R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15743/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:20.548 [print] {
"resourceType": "Procedure",
"id": "15743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:25.278+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:04:20.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:20.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"950"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:20.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hcb24gKmGlN6BW6R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15743/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15743/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:20.548 [print] {
"resourceType": "Procedure",
"id": "15743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:25.278+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:04:20.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:21.134 [print] {
"resourceType": "Procedure",
"id": "15743",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:25.278+02:00",
"source": "#hcb24gKmGlN6BW6R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-10",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:21.752 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:22.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:26.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:26.492+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:22.379 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "cervicotomía + esternotomía media + toracotomía 3er espacio intercostal, con disección del tumor y exéresis completa excepto en la zona que engloba el plexo braquial quedando una pastilla de tumor",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:22.958 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1006"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:22.958 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V5v1ddUYyCLkGO9m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15744/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:22.958 [print] {
"resourceType": "Procedure",
"id": "15744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:27.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:04:22.958 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:22.958 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1006"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:22.958 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V5v1ddUYyCLkGO9m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15744/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15744/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:22.958 [print] {
"resourceType": "Procedure",
"id": "15744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:27.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:04:22.958 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:23.561 [print] {
"resourceType": "Procedure",
"id": "15744",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:27.700+02:00",
"source": "#V5v1ddUYyCLkGO9m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:24.178 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:24.801 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:28.918+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:28.918+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:24.801 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "exéresis de la 10ª costilla izquierda con reconstrucción de la pared costal con lactosorb",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:25.434 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:25.434 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7We1fjql72p1Fzi2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15745/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:25.434 [print] {
"resourceType": "Procedure",
"id": "15745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:30.164+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:04:25.434 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:25.434 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"642"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:25.434 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7We1fjql72p1Fzi2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15745/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15745/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:25.434 [print] {
"resourceType": "Procedure",
"id": "15745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:30.164+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:04:25.434 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:25.993 [print] {
"resourceType": "Procedure",
"id": "15745",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:30.164+02:00",
"source": "#7We1fjql72p1Fzi2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:26.594 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:28.166 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:31.325+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:31.325+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:28.166 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"text": "Catarata OD",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:28.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:28.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6Mm9wCGazNIPRD6x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15746/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:28.784 [print] {
"resourceType": "Procedure",
"id": "15746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:33.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:04:28.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:28.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"801"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:28.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6Mm9wCGazNIPRD6x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15746/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15746/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:28.784 [print] {
"resourceType": "Procedure",
"id": "15746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:33.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:04:28.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:29.370 [print] {
"resourceType": "Procedure",
"id": "15746",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:33.530+02:00",
"source": "#6Mm9wCGazNIPRD6x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:30.009 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:30.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:34.747+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:34.747+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:30.604 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "orquiectomía izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:31.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"916"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:31.228 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"534BnHWKzsyidXtI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15747/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:31.228 [print] {
"resourceType": "Procedure",
"id": "15747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:35.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:04:31.228 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:31.243 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"916"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:31.243 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"534BnHWKzsyidXtI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15747/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15747/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:31.243 [print] {
"resourceType": "Procedure",
"id": "15747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:35.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:04:31.243 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:31.813 [print] {
"resourceType": "Procedure",
"id": "15747",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:35.978+02:00",
"source": "#534BnHWKzsyidXtI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:32.446 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:33.098 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:37.194+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:37.194+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:33.098 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "resección de la diáfisis femoral y restauración del espacio ósea con halo \u2013 injerto y enclavado intramedular. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:33.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1011"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:33.721 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BcxYw4ioAnzyDc1v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15748/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:33.721 [print] {
"resourceType": "Procedure",
"id": "15748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:38.462+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:04:33.721 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:33.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1011"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:33.721 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BcxYw4ioAnzyDc1v"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15748/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15748/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:33.721 [print] {
"resourceType": "Procedure",
"id": "15748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:38.462+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:04:33.721 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:34.301 [print] {
"resourceType": "Procedure",
"id": "15748",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:38.462+02:00",
"source": "#BcxYw4ioAnzyDc1v",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:34.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:35.642 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:39.696+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:39.696+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:35.642 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "lengua,"
}
}
],
"text": "Biopsia de la lesión mediante laparotomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:36.264 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"853"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:36.264 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n2EztJVzPdpwdXUr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15749/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:36.264 [print] {
"resourceType": "Procedure",
"id": "15749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:41.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "lengua,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:36.264 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:36.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"853"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:36.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n2EztJVzPdpwdXUr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15749/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15749/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:36.280 [print] {
"resourceType": "Procedure",
"id": "15749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:41.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "lengua,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:36.280 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:36.901 [print] {
"resourceType": "Procedure",
"id": "15749",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:41.010+02:00",
"source": "#n2EztJVzPdpwdXUr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "lengua,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:37.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:38.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:42.272+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:42.272+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:38.158 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Artrodesis posterior por escoliosis neuropática",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:38.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"604"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:38.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yGveCBmmoHmGR4iA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15750/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:38.744 [print] {
"resourceType": "Procedure",
"id": "15750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:43.498+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:04:38.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:38.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"604"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:38.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yGveCBmmoHmGR4iA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15750/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15750/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:38.760 [print] {
"resourceType": "Procedure",
"id": "15750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:43.498+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:04:38.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:39.393 [print] {
"resourceType": "Procedure",
"id": "15750",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:43.498+02:00",
"source": "#yGveCBmmoHmGR4iA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-01-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:40.052 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:40.651 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:44.782+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:44.782+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:40.651 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "exéresis tumoración + ooferectomía + salpinguectomía + apendicectomía ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:41.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"988"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:41.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sgKQn4kLLEPn8nRt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15751/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:41.275 [print] {
"resourceType": "Procedure",
"id": "15751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:46.020+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:04:41.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:41.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"988"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:41.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sgKQn4kLLEPn8nRt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15751/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15751/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:41.275 [print] {
"resourceType": "Procedure",
"id": "15751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:46.020+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:04:41.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:41.861 [print] {
"resourceType": "Procedure",
"id": "15751",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:46.020+02:00",
"source": "#sgKQn4kLLEPn8nRt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:42.509 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:43.142 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:47.250+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:47.250+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:43.142 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Orquiectomía derecha y biopsia testicular izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:43.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"710"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:43.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5alRq4CBveWFLMqu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15752/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15752/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:43.780 [print] {
"resourceType": "Procedure",
"id": "15752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:48.512+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:04:43.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:43.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"710"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:43.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5alRq4CBveWFLMqu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15752/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15752/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:43.780 [print] {
"resourceType": "Procedure",
"id": "15752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:48.512+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:04:43.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:44.482 [print] {
"resourceType": "Procedure",
"id": "15752",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:48.512+02:00",
"source": "#5alRq4CBveWFLMqu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:45.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:45.689 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:49.853+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:49.853+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:45.689 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Resección de tumoración tras laparotomía transversa transrectal derecha ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:46.327 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"990"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:46.327 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uJpe1JJ8u4zid3s1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15753/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15753/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:46.327 [print] {
"resourceType": "Procedure",
"id": "15753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:51.077+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:04:46.327 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:46.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"990"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:46.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uJpe1JJ8u4zid3s1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15753/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15753/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:46.343 [print] {
"resourceType": "Procedure",
"id": "15753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:51.077+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:04:46.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:46.944 [print] {
"resourceType": "Procedure",
"id": "15753",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:51.077+02:00",
"source": "#uJpe1JJ8u4zid3s1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-10-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:47.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:48.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:52.321+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:52.321+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:48.194 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "músculos"
}
}
],
"text": "Biopsia abierta 7ª costilla",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:48.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"953"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:48.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vctt1Rcnt11c4h6z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15754/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15754/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:48.849 [print] {
"resourceType": "Procedure",
"id": "15754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:53.598+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "músculos"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:04:48.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:48.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"953"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:48.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vctt1Rcnt11c4h6z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15754/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15754/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:48.849 [print] {
"resourceType": "Procedure",
"id": "15754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:53.598+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "músculos"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:04:48.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:49.466 [print] {
"resourceType": "Procedure",
"id": "15754",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:53.598+02:00",
"source": "#vctt1Rcnt11c4h6z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
],
"text": "músculos"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:50.098 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:50.715 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:54.839+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:54.839+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:50.715 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Tumorectomía polar riñón izquierdo ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:51.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"831"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:51.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h5pyTlX56LSSL9Eg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15755/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15755/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:51.358 [print] {
"resourceType": "Procedure",
"id": "15755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:56.093+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:51.358 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:51.374 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"831"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:51.374 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h5pyTlX56LSSL9Eg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15755/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15755/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:51.374 [print] {
"resourceType": "Procedure",
"id": "15755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:56.093+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:51.374 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:51.960 [print] {
"resourceType": "Procedure",
"id": "15755",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:56.093+02:00",
"source": "#h5pyTlX56LSSL9Eg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:52.539 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:53.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:57.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:57.274+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:53.148 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Exéresis completa de la masa de mesoíleon, apendicectomía profiláctica, exérsis divertículo de MEckel no complicado, biopsia testicular izquierda abierta.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:53.727 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1069"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:53.727 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tp5JwsezDFuzua9S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15756/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15756/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:53.727 [print] {
"resourceType": "Procedure",
"id": "15756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:58.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:04:53.727 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:53.727 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1069"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:53.727 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tp5JwsezDFuzua9S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15756/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:04:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15756/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:04:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:53.727 [print] {
"resourceType": "Procedure",
"id": "15756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:58.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:04:53.727 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:54.350 [print] {
"resourceType": "Procedure",
"id": "15756",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:04:58.464+02:00",
"source": "#tp5JwsezDFuzua9S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-03-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:54.967 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:56.586 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:04:59.712+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:04:59.712+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:04:56.586 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "próstata"
}
}
],
"text": "Lipoaspiración y lipofilling técnica Coleman",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:58.236 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"855"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:58.236 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4mL5VgP7SNx6CTi5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15757/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15757/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:58.236 [print] {
"resourceType": "Procedure",
"id": "15757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:02.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "próstata"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:58.236 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:58.236 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"855"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:58.236 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4mL5VgP7SNx6CTi5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15757/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15757/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:58.236 [print] {
"resourceType": "Procedure",
"id": "15757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:02.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "próstata"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:04:58.236 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:58.860 [print] {
"resourceType": "Procedure",
"id": "15757",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:02.961+02:00",
"source": "#4mL5VgP7SNx6CTi5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
],
"text": "próstata"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:59.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:00.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:04.219+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:04.219+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:00.111 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "útero,"
}
}
],
"text": "Nefrectomía radical izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:00.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"952"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:00.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jH4g8CVNmyeS2D0P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15758/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15758/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:00.769 [print] {
"resourceType": "Procedure",
"id": "15758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:05.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "útero,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:05:00.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:00.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"952"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:00.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jH4g8CVNmyeS2D0P"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15758/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15758/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:00.769 [print] {
"resourceType": "Procedure",
"id": "15758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:05.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "útero,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:05:00.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:01.433 [print] {
"resourceType": "Procedure",
"id": "15758",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:05.501+02:00",
"source": "#jH4g8CVNmyeS2D0P",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "útero,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:02.034 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:02.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:06.752+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:06.752+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:02.604 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Colocación de VDVP",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:03.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"920"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:03.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FUXh3aPiDMXAb8RV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15759/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15759/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:03.220 [print] {
"resourceType": "Procedure",
"id": "15759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:07.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:05:03.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:03.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"920"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:03.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FUXh3aPiDMXAb8RV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15759/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15759/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:03.220 [print] {
"resourceType": "Procedure",
"id": "15759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:07.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:05:03.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:03.838 [print] {
"resourceType": "Procedure",
"id": "15759",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:07.972+02:00",
"source": "#FUXh3aPiDMXAb8RV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-30",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:04.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:05.326 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:09.163+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:09.163+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:05.326 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Craniectomía suboccipital y exérsis de tumor de IV ventrículo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:05.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"487"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:05.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FP1GDNk3ydlmeSnF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15760/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15760/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:05.896 [print] {
"resourceType": "Procedure",
"id": "15760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:10.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02"
}
> *
print COOKIES
11:05:05.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:05.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"487"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:05.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FP1GDNk3ydlmeSnF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15760/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15760/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:05.896 [print] {
"resourceType": "Procedure",
"id": "15760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:10.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02"
}
> *
print COOKIES
11:05:05.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:06.497 [print] {
"resourceType": "Procedure",
"id": "15760",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:10.647+02:00",
"source": "#FP1GDNk3ydlmeSnF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:07.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:07.720 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:11.847+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:11.847+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:07.720 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Injertos de piel por EICHc sobreinfectada (complicación)",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:08.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"954"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:08.337 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MBbpdC2pCDb6GqFR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15761/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15761/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:08.337 [print] {
"resourceType": "Procedure",
"id": "15761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:13.085+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:05:08.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:08.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"954"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:08.337 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MBbpdC2pCDb6GqFR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15761/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15761/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:08.337 [print] {
"resourceType": "Procedure",
"id": "15761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:13.085+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:05:08.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:08.954 [print] {
"resourceType": "Procedure",
"id": "15761",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:13.085+02:00",
"source": "#MBbpdC2pCDb6GqFR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-21",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:09.539 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:10.109 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:14.280+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:14.280+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:10.109 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "lengua,"
}
}
],
"text": "Resección segmentaria y aloinjerto con síntesis mediante placa atornillada",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:10.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"999"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:10.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aY2DhDmamySI1WQ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15762/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15762/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:10.725 [print] {
"resourceType": "Procedure",
"id": "15762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:15.460+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "lengua,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:05:10.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:10.725 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"999"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:10.725 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aY2DhDmamySI1WQ5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15762/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15762/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:10.725 [print] {
"resourceType": "Procedure",
"id": "15762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:15.460+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "lengua,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:05:10.725 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:11.328 [print] {
"resourceType": "Procedure",
"id": "15762",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:15.460+02:00",
"source": "#aY2DhDmamySI1WQ5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
],
"text": "lengua,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:11.976 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:12.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:16.719+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:16.719+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:12.599 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Laparotomía y exéresis de los restos tumorales",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:13.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"960"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:13.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7XuStV2CQvIdpwmV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15763/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15763/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:13.464 [print] {
"resourceType": "Procedure",
"id": "15763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:18.190+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:05:13.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:13.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"960"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:13.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7XuStV2CQvIdpwmV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15763/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15763/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:13.464 [print] {
"resourceType": "Procedure",
"id": "15763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:18.190+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:05:13.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:14.065 [print] {
"resourceType": "Procedure",
"id": "15763",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:18.190+02:00",
"source": "#7XuStV2CQvIdpwmV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:14.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:15.357 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:19.443+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:19.443+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:15.357 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "exéresis tumoral de la masa paraaórtica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:16.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"835"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:16.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J1nFtCMKOvO6zobF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15764/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15764/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:16.011 [print] {
"resourceType": "Procedure",
"id": "15764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:20.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:05:16.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:16.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"835"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:16.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J1nFtCMKOvO6zobF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15764/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15764/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:16.011 [print] {
"resourceType": "Procedure",
"id": "15764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:20.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:05:16.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:16.645 [print] {
"resourceType": "Procedure",
"id": "15764",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:20.731+02:00",
"source": "#J1nFtCMKOvO6zobF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:17.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:17.894 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:22.026+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:22.026+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:17.894 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "cervicotomía izquierda horizontal. Disección y exérsis de paquete ganglionar múltiples",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:18.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"886"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:18.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e4xnXoEfdk92mmjX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15765/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15765/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:18.568 [print] {
"resourceType": "Procedure",
"id": "15765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:23.304+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:05:18.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:18.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"886"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:18.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e4xnXoEfdk92mmjX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15765/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15765/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:18.568 [print] {
"resourceType": "Procedure",
"id": "15765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:23.304+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:05:18.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:19.142 [print] {
"resourceType": "Procedure",
"id": "15765",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:23.304+02:00",
"source": "#e4xnXoEfdk92mmjX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:20.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:21.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:25.474+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:25.474+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:21.349 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Osteotomía desrrotadora interna de tibia y peroné bilateral y prótesis Kaliz + tenotomía Aquiles",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:21.982 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1138"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:21.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vGclJgYQlGNhUJSM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15766/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15766/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:21.982 [print] {
"resourceType": "Procedure",
"id": "15766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:26.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:21.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:21.982 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1138"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:21.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vGclJgYQlGNhUJSM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15766/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15766/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:21.982 [print] {
"resourceType": "Procedure",
"id": "15766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:26.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:21.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:22.552 [print] {
"resourceType": "Procedure",
"id": "15766",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:26.723+02:00",
"source": "#vGclJgYQlGNhUJSM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-09-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:23.169 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:23.770 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:27.906+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:27.906+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:23.770 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "resección restos tumorales en cuadrante superonasal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:24.387 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:24.387 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R0wmwN90ZaWybXiD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15767/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15767/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:24.387 [print] {
"resourceType": "Procedure",
"id": "15767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:29.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:05:24.387 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:24.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:24.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R0wmwN90ZaWybXiD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15767/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15767/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:24.403 [print] {
"resourceType": "Procedure",
"id": "15767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:29.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:05:24.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:24.957 [print] {
"resourceType": "Procedure",
"id": "15767",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:29.140+02:00",
"source": "#R0wmwN90ZaWybXiD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-02-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:25.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:26.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:30.363+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:30.363+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:26.226 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"text": "rbitotomía anterior, disección de la tumoración y extracción con su cápsula. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:26.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"876"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:26.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IT5gAXU9wotxx2sI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15768/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15768/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:26.849 [print] {
"resourceType": "Procedure",
"id": "15768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:31.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:05:26.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:26.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"876"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:26.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IT5gAXU9wotxx2sI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15768/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15768/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:26.849 [print] {
"resourceType": "Procedure",
"id": "15768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:31.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:05:26.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:27.483 [print] {
"resourceType": "Procedure",
"id": "15768",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:31.596+02:00",
"source": "#IT5gAXU9wotxx2sI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:28.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:29.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:32.814+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:32.814+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:29.688 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:30.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"933"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:30.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D8E2vLdFdQWR33aP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15769/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15769/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:30.289 [print] {
"resourceType": "Procedure",
"id": "15769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:35.032+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:05:30.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:30.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"933"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:30.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D8E2vLdFdQWR33aP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15769/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15769/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:30.289 [print] {
"resourceType": "Procedure",
"id": "15769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:35.032+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:05:30.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:30.865 [print] {
"resourceType": "Procedure",
"id": "15769",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:35.032+02:00",
"source": "#D8E2vLdFdQWR33aP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:31.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:32.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:36.215+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:36.215+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:32.101 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Extirpación hemimandíbula izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:32.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"946"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:32.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZMuA71mrXKAE2fRb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15770/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15770/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:32.734 [print] {
"resourceType": "Procedure",
"id": "15770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:37.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:05:32.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:32.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"946"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:32.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZMuA71mrXKAE2fRb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15770/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15770/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:32.734 [print] {
"resourceType": "Procedure",
"id": "15770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:37.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:05:32.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:33.350 [print] {
"resourceType": "Procedure",
"id": "15770",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:37.472+02:00",
"source": "#ZMuA71mrXKAE2fRb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-05",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:33.936 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:34.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:38.678+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:38.678+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:34.506 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Retirada placa osteosíntesis",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:35.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"592"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:35.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vDqfJ05Toz6uMOb9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15771/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15771/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:35.146 [print] {
"resourceType": "Procedure",
"id": "15771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:39.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:05:35.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:35.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"592"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:35.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vDqfJ05Toz6uMOb9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15771/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15771/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:35.146 [print] {
"resourceType": "Procedure",
"id": "15771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:39.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:05:35.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:35.750 [print] {
"resourceType": "Procedure",
"id": "15771",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:39.884+02:00",
"source": "#vDqfJ05Toz6uMOb9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:36.404 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:37.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:41.153+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:41.153+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:37.038 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "huesos,"
}
}
],
"text": " Laminectomía y resección",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:37.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"940"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:37.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PIlIOG6peQ14kgR1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15772/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15772/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:37.655 [print] {
"resourceType": "Procedure",
"id": "15772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:42.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "huesos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:37.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:37.670 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"940"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:37.670 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PIlIOG6peQ14kgR1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15772/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15772/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:37.670 [print] {
"resourceType": "Procedure",
"id": "15772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:42.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "huesos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:37.670 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:38.276 [print] {
"resourceType": "Procedure",
"id": "15772",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:42.408+02:00",
"source": "#PIlIOG6peQ14kgR1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
}
],
"text": "huesos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:38.899 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:39.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:43.638+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:43.638+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:39.467 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "resección en bloque del tumor, entre 1/3 medio femoral y 1/3 proximal pierna",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:40.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"972"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:40.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y6pDKy6ReIrGX2B6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15773/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15773/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:40.068 [print] {
"resourceType": "Procedure",
"id": "15773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:44.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:05:40.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:40.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"972"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:40.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y6pDKy6ReIrGX2B6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15773/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15773/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:40.068 [print] {
"resourceType": "Procedure",
"id": "15773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:44.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:05:40.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:40.670 [print] {
"resourceType": "Procedure",
"id": "15773",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:44.814+02:00",
"source": "#y6pDKy6ReIrGX2B6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:41.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:41.857 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:45.994+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:45.994+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:41.857 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Biopsia de la lesión mediante laparotomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:42.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"834"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:42.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uHKJKCpi3DL1LOLA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15774/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15774/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:42.473 [print] {
"resourceType": "Procedure",
"id": "15774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:47.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:05:42.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:42.473 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"834"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:42.473 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uHKJKCpi3DL1LOLA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15774/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15774/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:42.473 [print] {
"resourceType": "Procedure",
"id": "15774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:47.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:05:42.473 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:43.029 [print] {
"resourceType": "Procedure",
"id": "15774",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:47.222+02:00",
"source": "#uHKJKCpi3DL1LOLA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-01-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:43.614 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:44.210 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:48.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:48.358+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:44.210 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Resección de tumoración tras laparotomía transversa transrectal derecha ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:44.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"736"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:44.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4JF9eqcSw1bsrrIz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15775/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15775/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:44.803 [print] {
"resourceType": "Procedure",
"id": "15775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:49.557+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:44.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:44.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"736"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:44.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4JF9eqcSw1bsrrIz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15775/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15775/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:44.819 [print] {
"resourceType": "Procedure",
"id": "15775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:49.557+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:44.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:45.527 [print] {
"resourceType": "Procedure",
"id": "15775",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:49.557+02:00",
"source": "#4JF9eqcSw1bsrrIz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-09-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:46.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:46.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:50.851+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:50.851+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:46.724 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Linfadenectomía inguinal superficial derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:47.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1059"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:47.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bvOr9Tbkc7H9ovNa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15776/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15776/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:47.309 [print] {
"resourceType": "Procedure",
"id": "15776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:52.057+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:47.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:47.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1059"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:47.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bvOr9Tbkc7H9ovNa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15776/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15776/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:47.309 [print] {
"resourceType": "Procedure",
"id": "15776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:52.057+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:47.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:47.927 [print] {
"resourceType": "Procedure",
"id": "15776",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:52.057+02:00",
"source": "#bvOr9Tbkc7H9ovNa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:48.497 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:49.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:53.244+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:53.244+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:49.068 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "rbitotomía anterior, disección de la tumoración y extracción con su cápsula. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:49.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"984"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:49.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7EkbQuUoSrz3iG8a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15777/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15777/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:49.685 [print] {
"resourceType": "Procedure",
"id": "15777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:54.423+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:05:49.685 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:49.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"984"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:49.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7EkbQuUoSrz3iG8a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15777/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15777/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:49.685 [print] {
"resourceType": "Procedure",
"id": "15777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:54.423+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:05:49.685 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:50.260 [print] {
"resourceType": "Procedure",
"id": "15777",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:54.423+02:00",
"source": "#7EkbQuUoSrz3iG8a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:50.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:51.478 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:55.595+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:55.595+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:51.478 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Artrodesis pie izquierdo neuropático. Reintervención 2013 (complicación)",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:52.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1080"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:52.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F9dPzogYtbcRUXL8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15778/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15778/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:52.095 [print] {
"resourceType": "Procedure",
"id": "15778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:56.828+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:52.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:52.110 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1080"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:52.110 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F9dPzogYtbcRUXL8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15778/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15778/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:52.110 [print] {
"resourceType": "Procedure",
"id": "15778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:56.828+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:52.110 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:52.712 [print] {
"resourceType": "Procedure",
"id": "15778",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:56.828+02:00",
"source": "#F9dPzogYtbcRUXL8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:53.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:53.984 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:05:58.107+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:05:58.107+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:53.984 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Tiroidectomía",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:54.602 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"910"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:54.602 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dhBdaSmOru82M4B1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15779/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15779/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:54.602 [print] {
"resourceType": "Procedure",
"id": "15779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:59.328+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:05:54.602 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:54.602 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"910"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:54.602 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dhBdaSmOru82M4B1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15779/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:05:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15779/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:05:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:54.602 [print] {
"resourceType": "Procedure",
"id": "15779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:59.328+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:05:54.602 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:55.164 [print] {
"resourceType": "Procedure",
"id": "15779",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:05:59.328+02:00",
"source": "#dhBdaSmOru82M4B1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:55.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:56.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:00.560+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:00.560+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:56.467 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
],
"text": "testículos,"
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:57.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"956"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:57.085 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y7RLyycbCiwdthB4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15780/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15780/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:57.085 [print] {
"resourceType": "Procedure",
"id": "15780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:01.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
],
"text": "testículos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:57.085 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:05:57.100 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"956"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:05:57.100 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y7RLyycbCiwdthB4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15780/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15780/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:05:57.100 [print] {
"resourceType": "Procedure",
"id": "15780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:01.836+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
],
"text": "testículos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:05:57.100 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:05:57.670 [print] {
"resourceType": "Procedure",
"id": "15780",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:01.836+02:00",
"source": "#Y7RLyycbCiwdthB4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
}
],
"text": "testículos,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:05:58.275 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:05:58.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:03.022+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:03.022+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:05:58.896 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Biopsia abierta con craniotomía suboocipital",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:07.773 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:07.773 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sIIvZZZOV627fqqq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15781/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15781/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:07.788 [print] {
"resourceType": "Procedure",
"id": "15781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:12.523+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:07.788 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:07.788 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:07.788 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sIIvZZZOV627fqqq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15781/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15781/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:07.788 [print] {
"resourceType": "Procedure",
"id": "15781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:12.523+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:07.788 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:08.390 [print] {
"resourceType": "Procedure",
"id": "15781",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:12.523+02:00",
"source": "#sIIvZZZOV627fqqq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:08.960 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:09.747 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:13.704+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:13.704+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:09.747 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "oído."
}
}
],
"text": "orquiectomía izquierd y biopsia del testículo contralateral",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:10.579 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"860"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:10.579 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c2BBBnGJvEEx4wcW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15782/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15782/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:10.579 [print] {
"resourceType": "Procedure",
"id": "15782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:15.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "oído."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26"
}
> *
print COOKIES
11:06:10.579 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:10.579 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"860"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:10.579 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"c2BBBnGJvEEx4wcW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15782/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15782/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:10.579 [print] {
"resourceType": "Procedure",
"id": "15782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:15.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "oído."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26"
}
> *
print COOKIES
11:06:10.579 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:11.185 [print] {
"resourceType": "Procedure",
"id": "15782",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:15.309+02:00",
"source": "#c2BBBnGJvEEx4wcW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "oído."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:11.801 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:12.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:16.546+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:16.546+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:12.418 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Resección tumoral parcial",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:13.026 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"919"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:13.026 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ya39GgOgrSbD3JIx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15783/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15783/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:13.026 [print] {
"resourceType": "Procedure",
"id": "15783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:17.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:13.026 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:13.026 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"919"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:13.026 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ya39GgOgrSbD3JIx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15783/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15783/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:13.026 [print] {
"resourceType": "Procedure",
"id": "15783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:17.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:13.026 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:13.590 [print] {
"resourceType": "Procedure",
"id": "15783",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:17.777+02:00",
"source": "#Ya39GgOgrSbD3JIx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:14.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:14.797 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:18.967+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:18.967+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:14.797 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Craniotomía suboccipital y resección de la tumoración. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:15.440 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"953"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:15.440 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"979TB6R3aTbJVsce"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15784/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15784/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:15.440 [print] {
"resourceType": "Procedure",
"id": "15784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:20.177+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:06:15.440 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:15.440 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"953"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:15.440 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"979TB6R3aTbJVsce"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15784/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15784/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:15.440 [print] {
"resourceType": "Procedure",
"id": "15784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:20.177+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:06:15.440 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:16.041 [print] {
"resourceType": "Procedure",
"id": "15784",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:20.177+02:00",
"source": "#979TB6R3aTbJVsce",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-01-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:16.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:17.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:21.351+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:21.351+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:17.245 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Extirpación masa partes blandas",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:17.825 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"939"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:17.825 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XtZZ2biQemgIUTUe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15785/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15785/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:17.825 [print] {
"resourceType": "Procedure",
"id": "15785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:22.572+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:06:17.825 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:17.825 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"939"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:17.825 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XtZZ2biQemgIUTUe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15785/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15785/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:17.825 [print] {
"resourceType": "Procedure",
"id": "15785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:22.572+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:06:17.825 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:18.395 [print] {
"resourceType": "Procedure",
"id": "15785",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:22.572+02:00",
"source": "#XtZZ2biQemgIUTUe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-07-27",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:19.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:19.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:23.808+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:23.808+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:19.634 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "páncreas"
}
}
],
"text": "Laparotomia supraumbilical izquierda. Extirpación tumoral casi completa y biopsias",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:20.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1008"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:20.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0wHAWuKNLsxkhO91"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15786/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15786/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:20.255 [print] {
"resourceType": "Procedure",
"id": "15786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:24.988+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "páncreas"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:06:20.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:20.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1008"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:20.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0wHAWuKNLsxkhO91"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15786/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15786/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:20.261 [print] {
"resourceType": "Procedure",
"id": "15786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:24.988+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "páncreas"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:06:20.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:20.863 [print] {
"resourceType": "Procedure",
"id": "15786",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:24.988+02:00",
"source": "#0wHAWuKNLsxkhO91",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "páncreas"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:21.426 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:22.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:26.181+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:26.181+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:22.266 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "timo."
}
}
],
"text": "Resección incompleta de la tumoración torácica",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:23.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"958"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:23.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wgvbFswYcSQNTKAX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15787/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15787/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:23.170 [print] {
"resourceType": "Procedure",
"id": "15787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:27.914+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "timo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:06:23.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:23.177 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"958"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:23.177 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wgvbFswYcSQNTKAX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15787/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15787/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:23.177 [print] {
"resourceType": "Procedure",
"id": "15787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:27.914+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "timo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:06:23.177 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:23.778 [print] {
"resourceType": "Procedure",
"id": "15787",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:27.914+02:00",
"source": "#wgvbFswYcSQNTKAX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
],
"text": "timo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-09-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:24.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:24.981 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:29.117+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:29.117+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:24.981 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Resección L5, con sustitución de malla anterior y artrodesis L5-S1",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:26.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"860"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:26.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"12s5pfJv5TnbpACz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15788/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15788/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:26.563 [print] {
"resourceType": "Procedure",
"id": "15788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:31.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:06:26.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:26.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"860"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:26.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"12s5pfJv5TnbpACz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15788/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15788/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:26.563 [print] {
"resourceType": "Procedure",
"id": "15788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:31.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:06:26.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:27.133 [print] {
"resourceType": "Procedure",
"id": "15788",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:31.310+02:00",
"source": "#12s5pfJv5TnbpACz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-05-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:27.767 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:28.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:32.508+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:32.508+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:28.896 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Resección segmentaria y aloinjerto con síntesis mediante placa atornillada",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:29.513 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"971"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:29.513 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OACerhEmuvuzdjze"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15789/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15789/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:29.513 [print] {
"resourceType": "Procedure",
"id": "15789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:34.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:06:29.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:29.528 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"971"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:29.528 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OACerhEmuvuzdjze"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15789/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15789/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:29.528 [print] {
"resourceType": "Procedure",
"id": "15789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:34.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:06:29.528 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:30.098 [print] {
"resourceType": "Procedure",
"id": "15789",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:34.255+02:00",
"source": "#OACerhEmuvuzdjze",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-18",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:30.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:31.333 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:35.476+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:35.476+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:31.333 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:32.236 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"821"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:32.236 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vlfDd96TsWMUyUDQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15790/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15790/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:32.236 [print] {
"resourceType": "Procedure",
"id": "15790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:36.968+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:06:32.236 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:32.236 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"821"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:32.236 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vlfDd96TsWMUyUDQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15790/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15790/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:32.236 [print] {
"resourceType": "Procedure",
"id": "15790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:36.968+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
> *
print COOKIES
11:06:32.236 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:32.838 [print] {
"resourceType": "Procedure",
"id": "15790",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:36.968+02:00",
"source": "#vlfDd96TsWMUyUDQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-10-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "818983003",
"display": "Abdomen"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:33.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:34.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:38.247+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:38.247+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:34.141 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Nefrectomía radical derecha + lindafenectomía + biopsia trombo vena cava",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:34.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"969"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:34.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YV9sFpq60m50VUSP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15791/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15791/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:34.774 [print] {
"resourceType": "Procedure",
"id": "15791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:39.509+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:06:34.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:34.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"969"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:34.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YV9sFpq60m50VUSP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15791/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15791/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:34.774 [print] {
"resourceType": "Procedure",
"id": "15791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:39.509+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:06:34.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:35.376 [print] {
"resourceType": "Procedure",
"id": "15791",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:39.509+02:00",
"source": "#YV9sFpq60m50VUSP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-06-25",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:35.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:37.570 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:40.702+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:40.702+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:37.570 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:38.372 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1020"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:38.372 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0USs9688TTFJ6DDJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15792/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15792/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:38.372 [print] {
"resourceType": "Procedure",
"id": "15792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:43.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:06:38.372 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:38.372 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1020"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:38.372 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0USs9688TTFJ6DDJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15792/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15792/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:38.372 [print] {
"resourceType": "Procedure",
"id": "15792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:43.113+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:06:38.372 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:39.027 [print] {
"resourceType": "Procedure",
"id": "15792",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:43.113+02:00",
"source": "#0USs9688TTFJ6DDJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-12-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:39.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:40.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:44.356+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:44.356+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:40.229 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Reconstrucción mándibula con costilla y pelvis",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:41.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"600"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:41.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nc41SFsqdcdnxEzc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15793/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15793/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:41.853 [print] {
"resourceType": "Procedure",
"id": "15793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:46.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:06:41.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:41.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"600"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:41.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nc41SFsqdcdnxEzc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15793/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15793/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:41.853 [print] {
"resourceType": "Procedure",
"id": "15793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:46.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:06:41.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:42.470 [print] {
"resourceType": "Procedure",
"id": "15793",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:46.594+02:00",
"source": "#Nc41SFsqdcdnxEzc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-04-14",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:43.088 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:43.690 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:47.835+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:47.835+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:43.690 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Enucleación ojo izquierdo",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:44.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"923"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:44.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QSt5Jc8qhx8my2nL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15794/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15794/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:44.344 [print] {
"resourceType": "Procedure",
"id": "15794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:49.088+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:06:44.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:44.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"923"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:44.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QSt5Jc8qhx8my2nL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15794/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15794/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:44.344 [print] {
"resourceType": "Procedure",
"id": "15794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:49.088+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:06:44.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:44.981 [print] {
"resourceType": "Procedure",
"id": "15794",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:49.088+02:00",
"source": "#QSt5Jc8qhx8my2nL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-06-19",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:45.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:46.173 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:50.339+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:50.339+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:46.173 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Colocación de drenaje ventricular externo y cierre de fístula",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:46.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"957"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:46.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fr3DU3zJxDUIWwkV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15795/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15795/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:46.791 [print] {
"resourceType": "Procedure",
"id": "15795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:51.515+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:46.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:46.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"957"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:46.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fr3DU3zJxDUIWwkV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15795/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15795/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:46.791 [print] {
"resourceType": "Procedure",
"id": "15795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:51.515+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:46.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:47.422 [print] {
"resourceType": "Procedure",
"id": "15795",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:51.515+02:00",
"source": "#Fr3DU3zJxDUIWwkV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:48.024 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:48.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:52.770+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:52.770+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:48.582 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Biopsia mediante mediastinoscopia",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:49.181 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"589"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:49.181 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"00uCbLU184fsZH4Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15796/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15796/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:49.181 [print] {
"resourceType": "Procedure",
"id": "15796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:53.922+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:06:49.181 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:49.181 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"589"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:49.181 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"00uCbLU184fsZH4Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15796/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15796/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:49.181 [print] {
"resourceType": "Procedure",
"id": "15796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:53.922+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:06:49.181 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:49.784 [print] {
"resourceType": "Procedure",
"id": "15796",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:53.922+02:00",
"source": "#00uCbLU184fsZH4Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-08-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:50.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:51.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:55.132+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:55.132+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:51.003 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Epifisiodesis fémur distal derecho",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:51.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"822"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:51.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pDvaesOLud9bvUNV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15797/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15797/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:51.859 [print] {
"resourceType": "Procedure",
"id": "15797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:56.603+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:51.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:51.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"822"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:51.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pDvaesOLud9bvUNV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15797/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:06:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15797/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:51.859 [print] {
"resourceType": "Procedure",
"id": "15797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:56.603+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
> *
print COOKIES
11:06:51.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:53.480 [print] {
"resourceType": "Procedure",
"id": "15797",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:06:56.603+02:00",
"source": "#pDvaesOLud9bvUNV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-07-09",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:54.151 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 25ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 25ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:54.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:06:58.857+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:06:58.857+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:54.759 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Metastasectomía LSI y LII ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:55.393 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"922"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:55.393 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1C4TUuqPVJlZSbop"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15798/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15798/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:55.393 [print] {
"resourceType": "Procedure",
"id": "15798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:00.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:06:55.393 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:55.393 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"922"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:55.393 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1C4TUuqPVJlZSbop"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15798/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15798/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:06:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:55.393 [print] {
"resourceType": "Procedure",
"id": "15798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:00.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:06:55.393 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:55.977 [print] {
"resourceType": "Procedure",
"id": "15798",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:00.131+02:00",
"source": "#1C4TUuqPVJlZSbop",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:56.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 27ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 27ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:57.250 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:01.357+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:01.357+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:57.250 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"text": "Histerectomía + salpinguectomía bilateral + ooferectomía derecha + linfadenectomía pélvica bilateral + pexia ovárica izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:57.899 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:57.899 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kRSgSmZYnAGD9r2d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15799/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15799/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:57.899 [print] {
"resourceType": "Procedure",
"id": "15799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:02.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:06:57.899 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:06:57.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:06:57.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kRSgSmZYnAGD9r2d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15799/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15799/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:06:57.915 [print] {
"resourceType": "Procedure",
"id": "15799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:02.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
> *
print COOKIES
11:06:57.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:06:58.505 [print] {
"resourceType": "Procedure",
"id": "15799",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:02.577+02:00",
"source": "#kRSgSmZYnAGD9r2d",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "421060004",
"display": "Spine"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:06:59.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:06:59.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:03.842+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:03.842+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:06:59.724 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "orquiectomía izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:00.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"925"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:00.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q6hSiePr5DsOwVqg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15800/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15800/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:00.325 [print] {
"resourceType": "Procedure",
"id": "15800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:05.063+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:07:00.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:00.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"925"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:00.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q6hSiePr5DsOwVqg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15800/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15800/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:00.325 [print] {
"resourceType": "Procedure",
"id": "15800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:05.063+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:07:00.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:00.932 [print] {
"resourceType": "Procedure",
"id": "15800",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:05.063+02:00",
"source": "#Q6hSiePr5DsOwVqg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-02-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:01.529 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:02.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:06.267+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:06.267+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:02.099 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "bazo."
}
}
],
"text": "Toractomía posterior izquierda. ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:02.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:02.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BjGKfSOxl7Ga72TQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15801/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15801/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:02.685 [print] {
"resourceType": "Procedure",
"id": "15801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:07.425+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "bazo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01"
}
> *
print COOKIES
11:07:02.685 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:02.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:02.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BjGKfSOxl7Ga72TQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15801/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15801/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:02.685 [print] {
"resourceType": "Procedure",
"id": "15801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:07.425+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "bazo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01"
}
> *
print COOKIES
11:07:02.685 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:03.287 [print] {
"resourceType": "Procedure",
"id": "15801",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:07.425+02:00",
"source": "#BjGKfSOxl7Ga72TQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "bazo."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:03.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:04.530 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:08.643+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:08.643+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:04.530 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "Pene,"
}
}
],
"text": "cervicotomía izquierda horizontal. Disección y exérsis de paquete ganglionar múltiples",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:05.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1031"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:05.147 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cjTwGKEJd9eAPrhp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15802/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15802/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:05.147 [print] {
"resourceType": "Procedure",
"id": "15802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:09.877+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "Pene,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:07:05.147 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:05.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1031"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:05.147 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cjTwGKEJd9eAPrhp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15802/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15802/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:05.147 [print] {
"resourceType": "Procedure",
"id": "15802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:09.877+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "Pene,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:07:05.147 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:05.749 [print] {
"resourceType": "Procedure",
"id": "15802",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:09.877+02:00",
"source": "#cjTwGKEJd9eAPrhp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
],
"text": "Pene,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-02-16",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:07.594 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:08.196 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:12.120+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:12.120+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:08.196 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"text": "Laminectomía T11- L3 con resección tumoral completa intrarraquídea",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:08.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:08.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XyAorIiCb2Q4RAqb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15803/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15803/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:08.782 [print] {
"resourceType": "Procedure",
"id": "15803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:13.524+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:07:08.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:08.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"978"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:08.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XyAorIiCb2Q4RAqb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15803/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15803/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:08.782 [print] {
"resourceType": "Procedure",
"id": "15803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:13.524+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:07:08.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:09.352 [print] {
"resourceType": "Procedure",
"id": "15803",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:13.524+02:00",
"source": "#XyAorIiCb2Q4RAqb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-20",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:09.984 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:10.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:14.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:14.723+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:10.608 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Septostomía + biopsia + sensor PIC",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:11.189 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"829"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:11.189 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ILI5BwBoapfTwRsT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15804/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15804/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:11.189 [print] {
"resourceType": "Procedure",
"id": "15804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:15.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:07:11.189 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:11.189 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"829"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:11.189 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ILI5BwBoapfTwRsT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15804/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15804/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:11.189 [print] {
"resourceType": "Procedure",
"id": "15804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:15.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
> *
print COOKIES
11:07:11.189 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:11.790 [print] {
"resourceType": "Procedure",
"id": "15804",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:15.920+02:00",
"source": "#ILI5BwBoapfTwRsT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-03-06",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "2748008",
"display": "Spinal Cord"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:12.593 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:13.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:17.132+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:17.132+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:13.195 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"text": "Orquiectomía derecha y biopsia testicular izquierda",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:13.815 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:13.815 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NerrnE5azMuvLPQQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15805/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15805/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:13.815 [print] {
"resourceType": "Procedure",
"id": "15805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:18.540+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:07:13.815 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:13.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:13.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NerrnE5azMuvLPQQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15805/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15805/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:13.821 [print] {
"resourceType": "Procedure",
"id": "15805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:18.540+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:07:13.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:14.454 [print] {
"resourceType": "Procedure",
"id": "15805",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:18.540+02:00",
"source": "#NerrnE5azMuvLPQQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "15497006",
"display": "Ovary"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:15.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:15.658 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:19.793+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:19.793+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:15.658 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "Ooferectomía derecha",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:16.321 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"912"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:16.321 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nGUIkcGQuNNGmBvf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15806/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15806/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:16.321 [print] {
"resourceType": "Procedure",
"id": "15806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:21.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:07:16.321 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:16.321 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"912"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:16.321 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nGUIkcGQuNNGmBvf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15806/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15806/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:16.321 [print] {
"resourceType": "Procedure",
"id": "15806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:21.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:07:16.321 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:16.922 [print] {
"resourceType": "Procedure",
"id": "15806",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:21.059+02:00",
"source": "#nGUIkcGQuNNGmBvf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "64033007",
"display": "Kidney"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-08-22",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:17.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:18.113 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:22.252+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:22.252+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:18.113 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Intervención del resto tumoral",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:18.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"687"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:18.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XCJbeM2UwkqwMXw1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15807/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15807/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:18.819 [print] {
"resourceType": "Procedure",
"id": "15807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:23.568+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:07:18.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:18.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"687"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:18.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XCJbeM2UwkqwMXw1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15807/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15807/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:18.819 [print] {
"resourceType": "Procedure",
"id": "15807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:23.568+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:07:18.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:19.436 [print] {
"resourceType": "Procedure",
"id": "15807",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:23.568+02:00",
"source": "#XCJbeM2UwkqwMXw1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-15",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89545001",
"display": "Face"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:20.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:20.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:24.777+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:24.777+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:20.624 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Prótesis cadera izquierda ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:21.262 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"835"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:21.262 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VARlTWd1pBkBg7a4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15808/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15808/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:21.262 [print] {
"resourceType": "Procedure",
"id": "15808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:26.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:07:21.262 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:21.262 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"835"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:21.262 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VARlTWd1pBkBg7a4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15808/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15808/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:21.262 [print] {
"resourceType": "Procedure",
"id": "15808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:26.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
> *
print COOKIES
11:07:21.262 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:21.864 [print] {
"resourceType": "Procedure",
"id": "15808",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:26.004+02:00",
"source": "#VARlTWd1pBkBg7a4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-12-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12921003",
"display": "Pelvis"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:22.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:23.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:27.202+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:27.202+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:23.028 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Craneotomía y exérsis tumoración intraconal",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:23.651 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1068"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:23.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZIoR3LN7MqFZkZYk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15809/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15809/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:23.651 [print] {
"resourceType": "Procedure",
"id": "15809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:28.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:07:23.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:23.651 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1068"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:23.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZIoR3LN7MqFZkZYk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15809/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15809/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:23.651 [print] {
"resourceType": "Procedure",
"id": "15809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:28.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:07:23.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:24.215 [print] {
"resourceType": "Procedure",
"id": "15809",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:28.391+02:00",
"source": "#ZIoR3LN7MqFZkZYk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-11-08",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:24.805 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:25.421 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:29.543+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:29.543+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:25.421 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"text": "Laminectomía T-10- T12 ",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:26.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"919"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:26.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s8wtfFhPAUOJHDIl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15810/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15810/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:26.091 [print] {
"resourceType": "Procedure",
"id": "15810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:30.829+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:07:26.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:26.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"919"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:26.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"s8wtfFhPAUOJHDIl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15810/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15810/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:26.091 [print] {
"resourceType": "Procedure",
"id": "15810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:30.829+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
> *
print COOKIES
11:07:26.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:26.740 [print] {
"resourceType": "Procedure",
"id": "15810",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:30.829+02:00",
"source": "#s8wtfFhPAUOJHDIl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "78961009",
"display": "Spleen"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "69748006",
"display": "Thyroid"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-06-28",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "10200004",
"display": "Liver"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:27.356 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:27.926 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:32.098+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:32.098+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:27.926 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"text": "Toma de biopsia muscular preauricular",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:28.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:28.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wdyNPkQ0OoAfjIpw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15811/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15811/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:28.565 [print] {
"resourceType": "Procedure",
"id": "15811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:33.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:07:28.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:28.565 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"945"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:28.565 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wdyNPkQ0OoAfjIpw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15811/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15811/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:28.565 [print] {
"resourceType": "Procedure",
"id": "15811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:33.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
> *
print COOKIES
11:07:28.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:29.144 [print] {
"resourceType": "Procedure",
"id": "15811",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:33.300+02:00",
"source": "#wdyNPkQ0OoAfjIpw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2012-12-26",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:29.745 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:30.369 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:34.491+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:34.491+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:30.384 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Extirpación parcial del tumor",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:31.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:31.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GRRF2Pl0kq8otPPk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15812/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15812/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:31.017 [print] {
"resourceType": "Procedure",
"id": "15812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:35.739+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:07:31.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:31.017 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:31.017 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GRRF2Pl0kq8otPPk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15812/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15812/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:31.017 [print] {
"resourceType": "Procedure",
"id": "15812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:35.739+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:07:31.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:31.619 [print] {
"resourceType": "Procedure",
"id": "15812",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:35.739+02:00",
"source": "#GRRF2Pl0kq8otPPk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-03-12",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:32.271 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 32ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 32ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:32.945 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:36.983+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:36.983+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:32.945 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": "Laparoscopia. Resección intestinal con bordes libres y anastomosis termino - terminal.",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:33.515 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:33.515 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UxURaFbREOtvJfe4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15813/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15813/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:33.515 [print] {
"resourceType": "Procedure",
"id": "15813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:38.263+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:07:33.515 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:33.515 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"643"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:33.515 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UxURaFbREOtvJfe4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15813/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15813/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:33.515 [print] {
"resourceType": "Procedure",
"id": "15813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:38.263+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:07:33.515 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:34.101 [print] {
"resourceType": "Procedure",
"id": "15813",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:38.263+02:00",
"source": "#UxURaFbREOtvJfe4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2017-05-01",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:34.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:35.388 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:39.469+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:39.469+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:35.388 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "Pulmones,"
}
}
],
"text": "Laminectomía T11- L3 con resección tumoral completa intrarraquídea",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:36.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"988"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:36.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yK0Zs6gdj17UGdH7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15814/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15814/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:36.136 [print] {
"resourceType": "Procedure",
"id": "15814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:40.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "Pulmones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:07:36.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:36.152 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"988"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:36.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yK0Zs6gdj17UGdH7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15814/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15814/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:36.152 [print] {
"resourceType": "Procedure",
"id": "15814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:40.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "Pulmones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
> *
print COOKIES
11:07:36.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:36.822 [print] {
"resourceType": "Procedure",
"id": "15814",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:40.880+02:00",
"source": "#yK0Zs6gdj17UGdH7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "35039007",
"display": "Uterus"
}
],
"text": "Pulmones,"
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2014-11-17",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "32849002",
"display": "Oesophagus"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:37.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:38.064 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:42.177+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:42.177+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:38.064 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"text": "Ampliación bordes quirúrgicos + biopsia ganglio centinela",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:38.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1073"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:38.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZKWv1htI3BA1vdI6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15815/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15815/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:38.703 [print] {
"resourceType": "Procedure",
"id": "15815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:43.430+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:07:38.703 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:38.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"1073"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:38.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZKWv1htI3BA1vdI6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15815/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15815/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:38.703 [print] {
"resourceType": "Procedure",
"id": "15815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:43.430+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
> *
print COOKIES
11:07:38.703 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:39.552 [print] {
"resourceType": "Procedure",
"id": "15815",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:43.430+02:00",
"source": "#ZKWv1htI3BA1vdI6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "39607008",
"display": "Lung"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "67923007",
"display": "Hypothalamic structure"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2015-11-13",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "12738006",
"display": "Brain"
}
]
},
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:40.184 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:40.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:44.928+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:44.928+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:40.823 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "vejiga."
}
}
],
"text": "Exéresis T12 + artrodesis 2008",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:42.407 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"848"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:42.407 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eNZXllLsQXtWYuSl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15816/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15816/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:42.407 [print] {
"resourceType": "Procedure",
"id": "15816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:47.144+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "vejiga."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:07:42.407 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:42.407 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"848"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:42.407 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eNZXllLsQXtWYuSl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15816/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15816/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:42.407 [print] {
"resourceType": "Procedure",
"id": "15816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:47.144+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "vejiga."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
> *
print COOKIES
11:07:42.407 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:42.962 [print] {
"resourceType": "Procedure",
"id": "15816",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:47.144+02:00",
"source": "#eNZXllLsQXtWYuSl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
],
"text": "vejiga."
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2016-09-29",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "90456006",
"display": "Sympathetic nerve"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:43.579 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:44.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:48.318+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:48.318+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:07:44.149 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"text": "colocación de VDVP y resección macroscópicamente total",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:44.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"962"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:44.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cvi8NEVsO2Mjsu8V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15817/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15817/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:44.782 [print] {
"resourceType": "Procedure",
"id": "15817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:49.521+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:07:44.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:07:44.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"962"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:07:44.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cvi8NEVsO2Mjsu8V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15817/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 09:07:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/15817/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 09:07:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:07:44.782 [print] {
"resourceType": "Procedure",
"id": "15817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:49.521+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
> *
print COOKIES
11:07:44.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:07:46.386 [print] {
"resourceType": "Procedure",
"id": "15817",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T11:07:49.521+02:00",
"source": "#cvi8NEVsO2Mjsu8V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/surgery-sacrifiedOrgan",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "89837001",
"display": "Bladder"
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "81745001",
"display": "Eye"
}
]
}
}
],
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "387713003",
"display": "Procedimiento Quirúrgico"
}
]
},
"performedDateTime": "2013-05-02",
"bodySite": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "51185008",
"display": "Thoracic structure"
}
]
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:07:47.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:07:47.642 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T11:07:51.746+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T11:07:51.746+02:00"
}
]
}